05Aug

Garbage Week

Development, Starport, Upcoming

The Starport client appears to be leaking so now that the email stuff is done I will tackle the leaks.  That way we all can enjoy at least 12 uninterrupted hours of starport without rebooting our machines.

For the developers out there, I’m using visual studio 2005 and it comes with a built-in leak detector which makes things easier when it works correctly.  I believe it tags each memory allocation with a number.  If on exit, it finds an allocation that wasn’t properly freed up, it tells you that you leaked allocation number 4235 or whatever.  You can then run the application again and put a breakpoint on the 4235th allocation and see what line of code you’re ultimately leaking.  This assumes that the 4235th allocation is always the same, which in a game, is not likely.  Its way better than nothing though.  There are other things that you can do (like write better code in the first place).  You can systemically debug, like I can turn off the graphics and see if the leak goes away and try to pinpoint it that way.  Also if you use a good version control system you can roll back to a version that doesnt leak and slowly add in changes and see which caused the leak.  It all seems very logical when its presented to you as an option, but you’d be suprised at the number of developers that just stare blankly at lots of lines of code and give up saying “it could be anywhere!”.

 

Shout out to Jym (Scott) who setup and showed me the leak detection stuff in Starport.

CC

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Netscape
  • Reddit
  • Slashdot
  • StumbleUpon
No comments

Tuesday, August 5th, 2008 at 1:38 pm and is filed under Development, Starport, Upcoming. You can follow any responses to this entry through the RSS 2.0 feed. You can skip to the end and leave a response. Pinging is currently not allowed.

Leave a reply

You must be logged in to post a comment.