Hi,
There is a dialog I've created which has all controls created using "new". I have read that just calling "Destroy()" when the dialog is closed is sufficient. And wxWidgets internally frees up memory taken up by all controls. Could you please confirm that this is the case?
Thank you!
Freeing of memory used by controls
Re: Freeing of memory used by controls
Any wxWindow (this includes wxFrame, wxDialog etc) destroys all its children and its sizer when getting destroyed. As this happens recursively, you usually don't have to destroy any controls created with new.
There are a few exceptions though, but these are mentioned in the documentation for the respective class.
There are a few exceptions though, but these are mentioned in the documentation for the respective class.
Use the source, Luke!
Re: Freeing of memory used by controls
Thank you for the reply!!!