Memory Leaks!

Cosmic

Manners maketh man
Joined
Jul 4, 2009
Messages
12,888
Reaction score
951
FP$
29
Memory Leaks: the bane of every desktop app programmer's existence! :lol:

Have you ever run into these? How do you debug them?

I write a lot of stuff in Java, so I use the Java profiler tool to look at the memory graph and see whether it's healthy. As long as the memory returns to about the same level after I press the "College garbage" button, I can be pretty certain that there isn't a leak. When there is a leak, the profiler does a decent job of showing you who's using up memory or CPU. If that doesn't work, then I use the Eclipse Memory Analyzer, and that will find a bunch of suspects. 🙂
 
It just depends on how many programs are running, which ones are needed and which ones are not needed, also, If you have 64 gigs of memory you've got nothing to worry about... :lol:
 
64 gigs is a lot. 😛 Is it really possible to get that much on a desktop? I guess a web server would have that much, but geez 😛

Anyway, they can really be a problem, particularly for 32 bit software, where the memory is capped at I think 4 gigs (2 to the 32nd power bytes, I think?). But even if you're using 64, memory can really be eaten up, particularly if you're writing something that is going to run for a long time, and does stuff in real time. A server application is a good example, or maybe a game. In my case, it's 3D graphics.
 
Back
Top Bottom