Double the Threads, Double the Handles, Double The Memory

So, I spent 1 week trying to track down a problem in my code.
And it got to a point of feeling helpless and quiet demotivated. My code had an anomaly, a bug that resulting in a doubling of handles and a doubling of Threads.

I must have sifted through every piece of code possible, only to find a small an really stupid unclosed handle.
Now in hindsight I’ve realised, in finding this evil little bugs, comment out key functionality, deploy, debug, until you can gain a handle on more or less where the bug might be happening. Then, spend time there checking:

a) Poorly handled exceptions
b) Unclosed resource handles
c) A Freeing of Memory Used if making native calls
d) All Database connections are closed
e) Tight Loops
f) Scanners used with calling a next()

I just keeping adding that as a reminder of silly mistakes I make that I should avoid.

HTH me!

Don't be shellfish...Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInShare on TumblrEmail this to someone

Leave a Reply