I recently noticed that Fromafar started to work on some memory leaks, so I wold like to know what rhules are there to deal with destructors and functions that should remove stuff from stuff from the memory. For example how I have to deal with stuff that was created with new or other functions, what is the best way to deal with pointers?
Another thing I like to ask is that I noticed that Fromafar uses this format to indicate original and new code:
In my opinion it is a very clean solution and therefore I started to use it as well, it also allows to build the original *.exe if you define ACTIVISION_ORIGINAL. Well I am not so familiar with this format so therefore I accidently used this format:
So is there a difference between thos two formats or are they identical, it works in VC++. So is there something with it? Well in the end I stick to Fromafar's format for coherence reasons.
-Martin
Another thing I like to ask is that I noticed that Fromafar uses this format to indicate original and new code:
Code:
#if defined(ACTIVISION_ORIGINAL)
//Original code that is no longer used
#else
//New code
#endif
Code:
#if(ACTIVISION_ORIGINAL)
//Original code that is no longer used
#else
//New code
#endif
-Martin
. It contains a stack dump of the creation point for every piece of memory that has not been released when leaving the program.
I looked at class Sequence and saw it has a reference counter, but does not use it for deallocation.
Finally, i saw that the sequence gets deleted within class DQItem.

Comment