Alessandro Posted September 30, 2015 Posted September 30, 2015 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); Fm_Client.ShowModal; 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); Fm_Client.ShowModal; 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. Quote
Administrators Farshad Mohajeri Posted September 30, 2015 Administrators Posted September 30, 2015 Fm_Client: = nil; It neither frees the Form nor the memory. In UniGUI if Frm = nil then Frm := TUniForm1.Create(UniApplication); Frm.ShowModal( Procedure(Sender: TComponent; AResult:Integer) begin Frm := nil; end ); Frm is a class public variable. 1 Quote
Alessandro Posted October 1, 2015 Author Posted October 1, 2015 Farshad Mohajeri I'm sorry, because I'm new to uniGUI. could you tell me where I should put this command? Quote
Alessandro Posted October 1, 2015 Author Posted October 1, 2015 Farshad Mohajeri 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. Quote
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.