[fpc-devel] Suggestion: reference counted objects
Boian Mitov
mitov at mitov.com
Sun Sep 21 22:18:11 CEST 2014
In general you can have good and bad designs with and without ARC/weak
pointers/ or sweep GC.
>From all of the above, and I have done them all for years, the ARC is the
easiest to manage, and the one with the least side effects. What you was
does not differ from the issues of lost pointers in non ARC.
In essence you normally work with only Weak pointers, so if you let say like
them so much now, I don’t see a reason to hate them in ARC ;-) .
With best regards,
Boian Mitov
-------------------------------------------------------
Mitov Software
www.mitov.com
-------------------------------------------------------
-----Original Message-----
From: Hans-Peter Diettrich
Sent: Sunday, September 21, 2014 10:14 AM
To: FPC developers' list
Subject: Re: [fpc-devel] Suggestion: reference counted objects
And this is what the user of such a structure (standard libraries...)
does not always know. He may be unable to determine the reason for some
runtime error in his code, when an object was destroyed automagically
where it should still be alive. The user can debug (and fix) ordinary
(owner/owned) patterns, implemented in high level code, but not
table-driven (RTTI) or otherwise hidden (intrinsic) management
procedures. While the user can change the owner of an object at runtime,
he cannot change a weak reference into a strong one, without
recompilation of at least the unit containing that declaration, and
without figuring out the consequences of such an change.
More information about the fpc-devel
mailing list