0
What happens if you didn't delete the allocated memory inside a method ?
There is a trouble where if I delete the allocated memory it will result a strange behavior, while if I didn't it will work well but with a memory leak as I know. https://code.sololearn.com/cIwaLhplysTV/?ref=app
2 odpowiedzi
+ 1
Mohammed,
May I suggest you to use a vector for data container instead of using arrays? it will be much easier cause we don't need to worry about house cleaning.
This is an example that shows why manual memory management can be a tedious thing to do ...
+ 1
What is a memory leak?
https://www.pcmag.com/encyclopedia/term/memory-leak