2009-04-27 12:32:38 UTC
I know what the black problem is now. It is leaking GDI objects and when there are no more it goes black. I've narrowed it down to the brush and the pen objects, if I comment out the call to make/set them then the GDI usage stays flat.
I have also tried storing the old pen and brush and destroying them after I have set the new ones, no effect.
Could this be a wx issue? There is this bug report about a similar problem where wx is leaking GDI objects:
https://sourceforge.net/tracker/index.php?func=detail&aid=1819635&group_id=9863&atid=109863