DCSIMG
OutOfMemoryException - Dotmad (on .Net)

Dotmad (on .Net)

Just Another Web 5.0 Blog

Podcasts

Blogroll

Browse by Tags

All Tags » OutOfMemoryException (RSS)
Throw Exceptions Responsibly
Recently I had to spent some time to fix a crash in the application I'm working on: I kept getting an OutOfMemoryException with no relation to the amount of free memory on the computer. Eventually I found the bug: turns out the DrawArc method doesn't like to be called with a very small angle, so it goes BOOM. Another tidbit I found while searching for the cause was the fact this behavior is not unique to this method: "The thing I can add about this is that GDI+ tends to throw OutOfMemoryException...