herculanojs Posted February 4, 2018 Share Posted February 4, 2018 I have some doubts as to the right way to avoid memory leaks I have noticed a steady increase in memory on the server causing memory of bound. I already checked my source for Memory leak, identifying some of the points we are dealing with. However there remain some doubts regarding unigui treatment. 1) Forms Unigui There is freeonclose property, however when and how the unigui will destroy and release this form from memory. In creating a form, for example, procedure ... var form: Tuniform; begin form: = TUniFormClass (FindClass (FormClassName)). Create (UniApplication); form.show; end; 2) Visual objects dynamically created and added in form Should they be destroyed manually? 3) TUniFrame Frames created dynamically and added in form, will be destroyed in the automatic form free? 4) What dynamically created and added to a form for example, will not be destroyed by the unigui manager? What is the correct way to add components created dynamically and added to unigui objects, so that they are automatically destroyed in the free form, if any? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted February 5, 2018 Share Posted February 5, 2018 Hi, You need to follow general application development principles to avoid memory leaks. Quote Link to comment Share on other sites More sharing options...
herculanojs Posted February 5, 2018 Author Share Posted February 5, 2018 Hi, You need to follow general application development principles to avoid memory leaks. Yes Yes. I'm already taking care of it. I am asking only questions, because the only things that are created and not destroyed, which are being left to the unigui are the forms. So the questioning. And if dynamically created and linked visual components are only destroyed, they will be destroyed when the unigui engine destroys the form, whether or not they are destroyed together or must be done manually. I'm talking here about visual controls such as Tuniimage, Tunibutton, Tuniframe Quote Link to comment Share on other sites More sharing options...
Sherzod Posted February 5, 2018 Share Posted February 5, 2018 Hi, 1) Forms Unigui There is freeonclose property, however when and how the unigui will destroy and release this form from memory. In creating a form, for example, procedure ... var form: Tuniform; begin form: = TUniFormClass (FindClass (FormClassName)). Create (UniApplication); form.show; end; http://www.unigui.com/doc/online_help/application-forms.htm http://www.unigui.com/doc/online_help/free-form.htm 2) Visual objects dynamically created and added in form Should they be destroyed manually? If the owner is a nil, then yes 3) TUniFrame Frames created dynamically and added in form, will be destroyed in the automatic form free? yes... 4) What dynamically created and added to a form for example, will not be destroyed by the unigui manager? If the owner is a nil ... 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.