0

If the dynamically allocated pointers are not freed in C when using the default gcc compiler in linux, will it cause problems in system?

HARDY8118
  • 622
  • 7
  • 15

1 Answers1

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