Hi all,
I have problem with this code:
program FormsTest;
uses
KOL;
type
PForm1 = ^TForm1;
TForm1 = object(TObj)
Form: PControl;
public
procedure FrmClick(Sender: PObj);
end;
var
Form1: PForm1;
procedure NewForm1(var Result: PForm1; AParent: PControl);
begin
New(Result,Create);
with Result^ do
begin
Form := NewForm(AParent,'Form1').SetSize(320,240);
Form.OnFormClick := FrmClick;
end;
end;
procedure TForm1.FrmClick(Sender: PObj);
var
NewForm: PForm1;
begin
NewForm1(NewForm,Applet);
NewForm.Form.Show;
NewForm.Free;
end;
begin
Applet := NewApplet('Forms Test');
NewForm1(Form1,Applet);
Run(Applet);
end.
Application takes after start 3108 kB of memory.
When I click on the form, new window opens and application takes more of memory. If I close this new window, the usage of RAM not changes.
If I open 100 new windows, application takes 3376 kB of RAM. If I close all new windows, application still takes 3376 kB of RAM.
Can anybody help me?
Thanks. jarek