-
Memory leaks
Are there any programs I can use when I run my code to see if I have any memory leaks in it? Like if I forgot to delete a dynamically created variable in a function that gets called 15 times. Any programs that can tell me if I have a memory leak, and where it is? Thanks.
-
I think there's a free linux program called `electricfence' to find these for you, and I'm sure that there are many others.. But it might be easier to wrap malloc/free or new/delete with your own function that keeps track of how many bytes are allocated and freed.
-