[fpc-devel] Pointer cache for fast class/pointer access.

Marco van de Voort marcov at stack.nl
Thu Jan 5 12:45:58 CET 2012


In our previous episode, Sven Barth said:
> > Object instead Class?
> 
> They are basically similar to "records with methods" (which we now have 
> as well...) if you use them directly (this means: not as pointer types): 
> they are located on the stack and nested objects are part of the memory 
> structure of the object. But if you use references to objects you work 
> more like with classes as you have constructors, virtual methods and the 
> objects are then located on the heap (thus you need to care for the 
> memory management yourself).

Afaik records with methods is more advanced since they are initialized.

Afaik stack based TP Objects are not initialized and thus not safe for
automated types. (I looked into upgrading TV with ansistring a few years
back)




More information about the fpc-devel mailing list