I agree that Valgrind can help a lot. But the code you write that can cause 
memory errors should be minimal. Not only that, but I recommend writing a 
minimal prototype program that tests the concepts on their own. Make sure this 
minimal program works fine without errors or leaks, then transfer the code to 
any larger program you're working on, if such a program already exists.

Reply via email to