If the dynamically allocated pointers are not freed in C when using the default gcc compiler in linux, will it cause problems in system?
Asked
Active
Viewed 100 times
1 Answers
0
You'll have a memory leak, and if you keep doing it, you'll run out of memory (triggering the OOM-killer). But it won't leak memory beyond the lifetime of your program if that's what you're asking; all allocated memory is returned to the OS automatically when the process exits.

ShadowRanger
- 143,180
- 12
- 188
- 271
-
That answered my problem. Thanks. – HARDY8118 Apr 23 '20 at 20:00
-
@HARDY8118: If it solved your problem, please click the check mark next to this answer to indicate the problem is solved. – ShadowRanger Apr 23 '20 at 21:49