Curious about design choices

Nathan Ridge nathan.ridge at yahoo.ca
Sun Aug 5 13:07:32 PDT 2007


I'm a new user of wxWidgets and I'm curious about a couple of design choices in wxWidgets:
   
  1) What is the rationale for imposing the restriction that certain objects (such as those derived from wxWindow) cannot be created on the stack? (I'm guessing that overloading operators new/delete may be involved, but I don't understand why that's necessary.)
   
  2) What is the rationale for having to use Destroy() rather than "delete" to destroy an object created using "new"? (I've been told that Destroy() waits for all events sent to the object to be processed and then deletes the object, but I'm wondering why code that does that can't be placed in the destructor?)

       
---------------------------------
All new Yahoo! Mail  
---------------------------------
Get news delivered. Enjoy RSS feeds right on your Mail page.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wxwidgets.org/pipermail/wx-users/attachments/20070805/5dd21074/attachment.htm


More information about the wx-users mailing list