Bad memory management?
OK well I redid everything per the suggestions of everyone here and well, guess what.. it still froze (although my computer sounded a bit less strained). Thank you all though; I wouldn''t have caught those mistakes for several weeks.
Try starting up the task manager before you launch the debugger; you should be able to monitor memory / page file usage that way.
When you have an array initially specified as:
**array;
and you allocate it like so:
then shouldn't you be deallocating it using:
**array;
and you allocate it like so:
array = new <type>*[10];for(int i = 0; i < 10; i++) array[i] = new <type>();
then shouldn't you be deallocating it using:
for(int i = 0; i < 10; i++) delete array[i]; // NOT delete[] array<br></font><br><br><font color=blue>delete</font>[] array;<br></pre><!–ENDSCRIPT–><br><br>? <br><br>EDIT: grrr. <br><br><SPAN CLASS=editedby>[edited by - wavarian on June 5, 2004 2:22:36 AM]</SPAN>
Oh wow, thanks etnu. I looked at the processes running and converting a 512x512 bitmap into a 2*512*512-triangle octree took 266 megs of RAM.
you could try compiling your application with:
http://www.flipcode.com/cgi-bin/msg.cgi?showThread=12September2000-PresentingAMemoryManager&forum=askmid&id=-1
This will tell you where you are leaking memory, if any.
Good Luck
Willem
http://www.flipcode.com/cgi-bin/msg.cgi?showThread=12September2000-PresentingAMemoryManager&forum=askmid&id=-1
This will tell you where you are leaking memory, if any.
Good Luck
Willem
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement