I have had my share of little memory mistakes too , and also particularly one that caused any change to function names or code to make the application seem to function or suddenly break .

my cause was a structure that was allocated and then freed while on the very next line I was attempting to use it however the pointer wasn't really set empty though .

secondly make sure that you always check any pointer you plan to use , like :

if (entity!=null)
{
its safe to use
printf ("good in function foo line 12");
}
else
{
its unsafe to use
printf ("bad in function foo line 134");
}

then also , never ever run SED in compatibility mode , I had applications run without a single problem from sed in compatibility modes , only to discover memmory issues on release or shared with others wich .

lastly just a mention of something that came up not so long ago, there is apparently a mention by jcl that certain entity data is still accessible as non empty pointers until they are flushed after a certain process , it was recommended to check entity type along with entity! =null to be really sure .

no matter how gamestudio try to make memmory handling easier , in the end lite-c is still an unmanaged language so you still have to be fully aware of using memmory /pointers etc correctly.


Compulsive compiler