Hello, On Sun, 12 Sep 2004 20:38:52 +0400, [EMAIL PROTECTED] wrote:
>>Again, what if you assign T to a global var or a >class member ? >> >>Why would you want to do that? >> >>You still can declare "var T: MyClass" if you plan to >use T as a local >>reference. Obviously you only declare variables as >automatic when you >>want to bind its lifecycle to the current procedure. > >The problem actualy is not in automated destructors, >but in that the Class >types are actually pointers in Delphi OO model. That IIRC, at binary level everything is in place: var x: TSomeClass; { I don't know if following line would compile, but it could be hardcoded } y: array[1..SomeClass.InstanceSize] of Byte; begin x := SomeClass.InitInstance(@y); x.Create(params...); ... -- saludos, Nico Arag髇 NOTE: na-list address only works for messages coming from lists. Please, write to "nico" at the same domain for direct email. _______________________________________________ fpc-devel maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-devel