Hi,

what's the recommended way to prevent objects from being garbage collected?
For example, I create a wxImageList and pass it to wxNotebook::SetImageList().
As wxNotebook::SetImageList() doesn't take ownership of the list it could
happen that the garbage collector kills the wxImageList that I passed to 
SetImageList().

To prevent it from being collected I could assign the wxImageList to a global
variable but that doesn't look like a nice solution.... it would be nicer
if it were possible to reference the wxImageList somehow but I don't see
how this is possible. wxObject has a Ref() method but that doesn't seem to
be up for the job. 

Any hints?

-- 
Best regards,
 Andreas Falkenhahn                          mailto:andr...@falkenhahn.com


------------------------------------------------------------------------------
DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
_______________________________________________
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users

Reply via email to