> On Jun 27, 2019, at 5:53 PM, Ben Grasset <operato...@gmail.com> wrote:
> 
> If you specifically need inheritance (combined with virtual methods) you 
> should probably just use classes, because doing it with objects will require 
> heap allocation regardless. 
> 

Heap allocate how so? Calling the constructor seems to fix this and puts the 
VMT table on the stack (I think anyways). Btw I’m doing this specifically as 
testing for a possible “advancedobjects” mode switch and the only reason to use 
objects is for inheritance on the stack (otherwise records or classes).

Regards,
        Ryan Joseph

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to