Problem Solved!

Christopher Bruno cbruno.linux at gmail.com
Tue May 27 14:43:08 PDT 2008


I finally solved the problem - 2 things. I needed to call dc.Set*(wxNull*)
after using a resource before it left scope, and

wxPoint is a GDI object!. I was always having exactly 9 GDI objects added
everytime I moved an  object (like a shape or image) on the page..9
corresponds to the 8 points that surround an object + the center..these were
private variables in a Cell class that stores objects in my page layout
program.

I was not deleting cell objects, but simplycalling cells.clear() (my
underlying STL container inside a Page class that stored cells).

I never realized that calling the clear() function for containers in the STL
does not call the objects destructor-so these Cell variables were hanging
around in memory, along with their GDI objects, causing the program to crash
once 10,000 GDI objects was reached.

Thanks again wx-users!
-- =

Chris Bruno
n! Labs
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wxwidgets.org/pipermail/wx-users/attachments/20080527/d36=
5b38c/attachment.htm


More information about the wx-users mailing list