[fpc-pascal] Managed record questions

Ryan Joseph ryan at thealchemistguild.com
Thu Mar 8 09:19:46 CET 2018



> On Mar 8, 2018, at 3:12 PM, Michael Van Canneyt <michael at freepascal.org> wrote:
> 
> You can still use objects.

I guess I can go back to objects and use pointers to objects when I want classes? I don’t know if objects even have all the same functionality of classes, and aren’t they for backwards compatibility anyways? That doesn’t sound like the right direction to be going honestly.

It’s funny but I think the old object model was more flexible because you could make pointers to objects (if I remember correctly) but you can’t go backwards from classes to stack allocation. Deliberate or an unfortunate oversight?

> 
>> 
>> Btw can you override the memory manager used for class constructors? If a class reused the same block of memory that would have a similar effect and useful for tight loops where you’re allocating/deallocating memory over and over again.
> 
> You can do this for particular classes by overriding NewInstance.

Can you elaborate please? Not sure how that looks.


Regards,
	Ryan Joseph




More information about the fpc-pascal mailing list