ofImage causes app to hang on close

I’ve got an instance of a class in my ofSimpleApp which itself has an instance of ofImage.

When I close the app using the [X] in the top of the window the app hangs and then crashes. I’m using Codeblocks to compile and I’ve narrowed the problem down to this ofImage.

It doesn’t matter if it’s a .png or .jpg. I’ve tried calling “clear” in the destructor.


Can you post up the skeleton of your class? I can’t think of anything in the ofImage class could cause an app to crash on deallocation, maybe the call to release in ofTexture, but even that seems unlikely.