Sven Barth schrieb:
Am 27.10.2014 17:20 schrieb "Hans-Peter Diettrich" <drdiettri...@aol.com
<mailto:drdiettri...@aol.com>>:
> Something like ShortString and AnsiString?
With the difference that Short- and AnsiString are assignable to
eachother while Jonas does not want that for reference counted and
ordinary classes.
Where would this matter? When TObject and TManagedObject are different
(base) types, a direct assignment of references is impossible.
What do you mean with "virtual counting methods"?
Overriding these methods can enable/disable refcounting for a class, and
all classes derived from it. The default then can be to do nothing (no
counting).
The main reason I decided not to introduce reference counting for every
class was that some people feared the performance impact of the
reference counting. Though Florian said that it shouldn't be that bad on
today's CPUs...
Did you ever benchmark your model?
That said: if someone wants to test it one could add "refcounted" to
TObject (my code should(!) handle that correctly) and see what
happens... (of course there will be problems with circular references then)
Fine :-)
DoDi
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel