[fpc-devel] Modernising Pascal

Florian Klaempfl florian at freepascal.org
Wed Feb 23 13:52:52 CET 2005

Jamie McCracken wrote:

> Florian Klaempfl wrote:
>> So if you look at this, you know why classes aren't ref. counted. And 
>> there is no chance to avoid the code generated for the interface.
> Yes that does look very bad but if you passed a pointer to the ref 
> counted object as the function arguement then you would not get all that 
> overhead, yes?

An interface _is_ a pointer? You have always to increase the ref. count when 
creating a new reference to ref. counted class. Ref. counting isn't that easy as 
you might think. Multi threading and exceptions make it rather complicated.

More information about the fpc-devel mailing list