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.


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

Reply via email to