Don't sue me!
2011-07-23 14:35:17 UTC
My vector objects are leaking memory (total 400+ kb each time), mostly because I still have no idea how to clear its contents.
I tried .shrink(0), .remove(0, .length()) but the leak was still there.
.deletecontents() deletes the targets of the pointers, which is of no use since I have objects inside the array.
The objects are of class "enemy" which I'm using to represent enemies in my game.
enemy doesn't have a destructor since neither it nor the base objects it inherits from have any pointers.
Can you give me any tips or suggestions on how to correctly empty my vectors and fix this?
Links:
tools.h: http://code.google.com/p/remod-sauerbraten/source/browse/trunk/shared/tools.h?r=91