50 meg to 200 meg, definately a memory leak!
you don't have to make pointers NULL. Well it is nice after you delete them to make them NULL but it won't delete the object! So if you use operator new, or malloc, you need to free that :)
like
don't know about malloc, I am a c++ coder :p but google can tell you that
Also,in the function for example walking to a place, you make a workobject that gets handed to the workmanager, but I think you do need to delete that workobject afterwards! You should research that :)
Have fun debugging!
you don't have to make pointers NULL. Well it is nice after you delete them to make them NULL but it won't delete the object! So if you use operator new, or malloc, you need to free that :)
like
Code:
MyObject *p = new MyObject(); if(p!=NULL) //safety measure, so you don't delete a pointer twice delete p; //safety measure, so you don't delete a pointer twice p = NULL;
Also,in the function for example walking to a place, you make a workobject that gets handed to the workmanager, but I think you do need to delete that workobject afterwards! You should research that :)
Have fun debugging!