Does Delphi really handle dynamic classes better than static?
- by John
Hello,
I was told more than once that Delphi handles dynamic classes better than static.Thereby using the following:
type Tsomeclass=class(TObject)
private procedure proc1;
public
someint:integer;
procedure proc2;
end;
var someclass:TSomeclass;
implementation
...
initialization
someclass:=TSomeclass.Create;
finalization
someclass.Free;
rather than
type Tsomeclass=class
private class procedure proc1;
public
var someint:integer;
class procedure proc2;
end;
90% of the classes in the project I'm working on have and need only one instance.Do I really have to use the first way for using those classes? Is it better optimized,handled by Delphi?
Sorry,I have no arguments to backup this hypothesis,but I want an expert's opinion.
Thanks in advance!