+ 1

In memory leak the previous data will take place permanently or till our program is running?

Memory leak in c

18th Aug 2022, 12:12 PM
Suraj Joshi
2 Réponses
+ 2
Only while the program is running. It is automatically freed by the operating system when program is closed.
18th Aug 2022, 9:40 PM
lion
lion - avatar
0
Suppose we are using malloc function inside a while loop. We are allocating memory and not freeing it .while loop ittirating this process again and again. So the previous allocated memory which we didn't freed will take place permanently or till program is running?
18th Aug 2022, 12:15 PM
Suraj Joshi