[fpc-devel] Suggestion: reference counted objects
Boian Mitov
mitov at mitov.com
Sun Sep 21 18:28:37 CEST 2014
The biggest problem is when to initiate the detection and still maintain some form of determinism. That was the algorithm I proposed a while back, but it was not without a drawbacks. It would have affected performance.
There is not really a silver bullet for this as far as I know.
With best regards,
Boian Mitov
-------------------------------------------------------
Mitov Software
www.mitov.com
-------------------------------------------------------
From: Sven Barth
Sent: Sunday, September 21, 2014 12:33 AM
To: FPC developers' list
Subject: Re: [fpc-devel] Suggestion: reference counted objects
Am 21.09.2014 06:11 schrieb "Boian Mitov" <mitov at mitov.com>:
>
> Unless you implement something like the semi-deterministic GC that I proposed few years ago, weak pointers are the only solution for avoiding circular reference deadlock in ARC as far as I know. They are simply necessary evil, and a small one base on my current experience with them.
There are cycle detection algorithms that could be used upon a decrease of a reference count. Biggest problem is that they would be quite expensive (regarding performance) in case of complex object instance "graphs" like the LCL/VCL.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20140921/622abc94/attachment.html>
More information about the fpc-devel
mailing list