"Christophe Limbrée" <[EMAIL PROTECTED]> writes: [Please do not top-post.]
> I didn't free all variables allocated with new because I thought that > the program termination woud free them for me. That's correct, but it is "cleaner" to delete dynamic storage, because: - it makes analysis with leak checkers (such as valgrind) easier, and - you never know when you'll want to reuse this code in a loop, and if the code doesn't do cleanup, you'll run out of memory really fast. > Obviously that could cause my problem. No, it can't. *Not* freeing the memory will never cause a segfault (but it can cause abort if the allocator runs out of memory). > As I am rewriting a c program, I am adding c++ code > step by step into my source code. c and c++ are mixed into my code. I > read somewhere that I could get conflict. Is it right? Wrong. Mixing C and C++ is perfectly safe, and does not *in itself* cause any segfaults. You have a bug, and valgrind will likely show it to you immediately, so why don't you stop wasting time hypothesisizing what the problem might be, and use proper tools to find it. Cheers, -- In order to understand recursion you must first understand recursion. Remove /-nsp/ for email. _______________________________________________ help-gplusplus mailing list help-gplusplus@gnu.org http://lists.gnu.org/mailman/listinfo/help-gplusplus