Kostas Michalopoulos schrieb:
On Mon, Oct 27, 2014 at 5:17 PM, Hans-Peter Diettrich
<drdiettri...@aol.com <mailto:drdiettri...@aol.com>> wrote:
Then the compiler can safely generate refcounting code for *all*
objects and non-weak references, and the counting methods take care
of required operations
Wouldn't that cause all objects to "pay" (both in terms of performance
and memory) for something that they don't use?
Right, that's why I suggest to keep both models separate. But the real
runtime impact has to be benchmarked - it may be as low as with other
managed types (AnsiString...), where nobody has complaints. Memory usage
(4 bytes per object) should not matter, Delphi accepts it just for
mobile devices!
IMO it is better to fully
disallow subclasses from introducing reference counting than force
functionality on objects that they don't need to use.
It *looks* better, but has several issues.
DoDi
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel