Good Evening All,
In typical C++, pointers to objects created with the new operator, must be manually deleted to prevent memory leaks.
For a wxDialog....I am requesting a clarification please. When a wxDialog is closed by the user - does this still apply? Or does the wxDialog self-destruct when it's closed - rendering it's pointer as garbage?
Or do we need to destroy the wxDialog's pointer manually?
Thanks!
Dave
wxDialog Close clarification request
Re: wxDialog Close clarification request
Dialog can't destroy themselves, because they can - and usually should - be created on the stack. So, if you create it on the heap, you have to delete it.
https://docs.wxwidgets.org/trunk/classw ... alog_modal
https://docs.wxwidgets.org/trunk/classw ... alog_modal
Use the source, Luke!
Re: wxDialog Close clarification request
OK - that's a helpful tidbit...create them on the stack......
Thank You,
Dave
Thank You,
Dave