55143681 Posted January 30, 2020 Share Posted January 30, 2020 In my UniForm,I created so many UniPanels like this: TUniPanel *newCtl=new TUniPanel(Sender); newCtl->Name="panel_"+seqStr; Need I free all the newCtl before I close the UniForm? Or all the newCtl will be freeed after the UniForm closed automatic? Quote Link to comment Share on other sites More sharing options...
Jean-Marc Kiener Posted January 30, 2020 Share Posted January 30, 2020 http://www.unigui.com/doc/online_help/api/uniPanel_TUniPanel_Create@TComponent.html If the parameter aOwner is set to a form, then the form will free the panels automatic if the form get destroyed. if the parameter aOwner = nil then you have to free the panels by yourself. 1 Quote Link to comment Share on other sites More sharing options...
Abaksoft Posted January 30, 2020 Share Posted January 30, 2020 @55143681 "It is always better to allow uniGUI to manage when controls must be freed. Normally, controls are destroyed when their owner form is closed." (Farshad) http://www.unigui.com/doc/online_help/destroying-controls-at-runtime.htm http://www.unigui.com/resources/online-documentation/developer-manual Quote Link to comment Share on other sites More sharing options...
55143681 Posted January 31, 2020 Author Share Posted January 31, 2020 On 1/30/2020 at 10:39 PM, Jean-Marc Kiener said: http://www.unigui.com/doc/online_help/api/uniPanel_TUniPanel_Create@TComponent.html If the parameter aOwner is set to a form, then the form will free the panels automatic if the form get destroyed. if the parameter aOwner = nil then you have to free the panels by yourself. Thank you verymuch Quote Link to comment Share on other sites More sharing options...
55143681 Posted January 31, 2020 Author Share Posted January 31, 2020 On 1/30/2020 at 11:02 PM, Abaksoft said: @55143681 "It is always better to allow uniGUI to manage when controls must be freed. Normally, controls are destroyed when their owner form is closed." (Farshad) http://www.unigui.com/doc/online_help/destroying-controls-at-runtime.htm http://www.unigui.com/resources/online-documentation/developer-manual Thank you verymuch Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.