On 28 Jan 2013, at 18:00, Alexander Klenin wrote:

> On Tue, Jan 29, 2013 at 12:39 AM, Paul Ishenin <paul.ishe...@gmail.com> wrote:
>>> It offers nothing that objects didn't already have.
>> It offers understandable memory layout without VMT.
> Oops... so, FPC "object" type always creates VMT -- even if there is
> no virtual methods?

Not always, but there are other conditions when a VMT is generated for objects, 
just like in Delphi/TP: when a constructor or destructor exists. In general, 
I'd also strongly recommend to treat them as opaque types, especially because 
this VMT may be inserted in the middle of the object, and be subject to special 
alignment requirements because of the target (regardless of the current 
{$packrecords x} or packed setting).


Jonas
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to