Jump to content

Memory leaks questions


herculanojs

Recommended Posts

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?

 

 

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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

 

...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...