Name: Anonymous 2008-12-06 19:46
So I'm writting an application in c++ using wxWidgets. to get some semblance of cross-platform compatability (it will eventually have to be ported to mac)
For one of the components, I have to display a sequence of bitmaps with as little delay as possible. So I load them into memory (~10mb) and store the pointers in a STL vector.
After this part quits and returns back to the main part of the application I call the delete operator on the vector in order to destroy the wxBitmap objects and dereference all the memory, but it doesn't, the docs say that the bitmap will get deleted if there are no more refernces to the bitmap and There arent (the only place the reference is stored is in the vector, it gets passed to the wxPanel doing the drawing, but I delete the panel before I delete the vector)
Hopefully someone can give me a hint in the right direction.
For one of the components, I have to display a sequence of bitmaps with as little delay as possible. So I load them into memory (~10mb) and store the pointers in a STL vector.
After this part quits and returns back to the main part of the application I call the delete operator on the vector in order to destroy the wxBitmap objects and dereference all the memory, but it doesn't, the docs say that the bitmap will get deleted if there are no more refernces to the bitmap and There arent (the only place the reference is stored is in the vector, it gets passed to the wxPanel doing the drawing, but I delete the panel before I delete the vector)
Hopefully someone can give me a hint in the right direction.