Micha Nelissen wrote:
procedure tcontractform.add;
begin
  self:=tcontractform.create(owner);
  self.insert.enabled:=true;
  self.btnregion.enabled:=true;
  self.showmodal;
end;

In this case I guess there is even a "memory leak" in the sense that Owner is usually "Application" which is a variable existing for lifetime of program. So although this temporary form is freed eventually it takes up memory until end of program lifetime AFAICS.

A temporary variable named "LeakedContractForm" would have been much clearer then :-P.

Or put Self.Free at the end which is even creepier.

Micha
_______________________________________________
fpc-devel maillist  -  [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to