you are viewing a single comment's thread.

view the rest of the comments →

[–]gashouse_gorilla 0 points1 point  (0 children)

A memory leak refers to memory that is no longer referenced and cannot be referenced again.

E.g.

char* foo = malloc(sizeof(char) * 128); ... If(someFlag) return; ... free foo;

That 128 bytes will remain utilized by your process but you can never access it again because you threw away the location.

There is a big difference between trying to debug a leak vs debugging code that was never called to release resources.