Delphi should give you a warning when compiling this, you probably missed it: "constructing an instance containing abstract methods". TStrings is an abstract class, which should not be used as standalone.
Try using TStringList instead.
procedure DoSomeStuff;var MyStrings: TStrings;begin MyStrings:= TStringList.Create(); // creating TStringList instead of TStrings MyStrings.Add('Hello');// do some stuff here MyStrings.Free();end;
- Arcane Lifepower -
"Although the world would call me free
Each day the more her slave am I
For in her very way to be
There's I don''t know what, I don't know why"
Edited by - Lifepower on December 11, 2001 1:45:04 PM