Jump to content

Creating form at runtime / Criando form em tempo de execução


Recommended Posts

Good afternoon.
Before, in Delphi 7 for desktop I created the forms at runtime with the following command:
if Fm_Client  = nil then
   Fm_Client: = TFm_Client.Create (Application);
And to close the form I released the memory with the command:
Fm_Client: = nil;
How to do this same procedure in uniGUI?
I tried to do and XE5 did not accept the command.
Just like the previous Delphi, I create forms at runtime.
Tks, see ya later.
Boa tarde.
Galera, antes, no Delphi 7 para desktop eu criava os formulários em tempo de execução com o seguinte comando:
if Fm_Client  = Nil then
   Fm_Client := TFm_Client.Create(Application);
E ao fechar o formulário eu liberava da memória com o comando:
Fm_Client := nil;
Como fazer esse mesmo procedimento no uniGUI?
Eu tentei fazer e o XE5 não aceitou o comando.
Assim como o delphi anterior, quero criar os formulários em tempo de execução.
Obrigado, até mais.


Link to comment
Share on other sites

  • Administrators
Fm_Client: = nil;

It neither frees the Form nor the memory.




if Frm = nil then
    Frm := TUniForm1.Create(UniApplication);
    Procedure(Sender: TComponent; AResult:Integer)
      Frm := nil;

Frm is a class public variable.

  • Upvote 1
Link to comment
Share on other sites

What I see is this:

When I run the application on the server, it consumes very little memory.

Once the first user accesses the system, the memory consumption goes to 150Mb, and for each user who accesses the system it adds plus 150Mb.

10 users logged into the system, my memory consumption reaches 1GB!

And even after the user closes the browser, consumption does not decrease.

How do I solve this problem?

Thank you.

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.

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...