Comments (2)
질문1
(0 - 2 - 1)로만 연결된 그래프를 생각해보시면 좋을 것 같습니다!
질문2
그래프의 데이터가 void형 포인터들이라 모든 형태의 데이터든 저장할 수 있어요
make_graph에서는 문자열이기 때문에 단순 free함수로 메모리 해제를 할 수 있지만
복잡한 형태의 데이터라면 free함수로는 메모리 누수가 생길 수 있습니다
예)
typedef strcut s_my_struct {
char *str;
char *str2;
} t_my_struct
t_my_struct *my = 메모리할당 + 초기화;
free(my); // my->str과 my->str2에서 메모리 누수가 발생할 수 있음
from 42-algorithm.
오우 바로바로 이해가 됩니다 설명짱짱!
make_graph에서 주는 데이터가 문자열이기 때문에 가능한 것이었군요
친절한 설명 감사드립니다~!!
42알고리즘 만세~~~
from 42-algorithm.
Related Issues (9)
- Singly_Linked_List_implementation.c가 실행이 되지않는 문제 그리고 해결 HOT 1
- System("leaks ....")가 malloc의 메모리 누수를 못 잡기도하나요? HOT 7
- double linked list에서 ex00 구조체에서 오타가 있습니다 HOT 5
- 5.tree 중 접두사트리 insert 구현 관련 질문드립니다 HOT 1
- (circle_linked_list) 의문점이 있습니다. HOT 1
- README.md파일 오기 HOT 2
- (circle_linked_list) list_add에 대한 질문이 있습니다. HOT 3
- 안녕하세요! 질문이 있습니다. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from 42-algorithm.