<HTML><HEAD></HEAD>
<BODY dir=ltr>
<DIV dir=ltr>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial'; COLOR: #000000">
<DIV>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.</DIV>
<DIV>There is not really a silver bullet for this as far as I know.</DIV>
<DIV> </DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial'; COLOR: #000000">With best
regards,<BR>Boian
Mitov<BR><BR>-------------------------------------------------------<BR>Mitov
Software<BR>www.mitov.com<BR>-------------------------------------------------------</DIV>
<DIV
style='FONT-SIZE: small; TEXT-DECORATION: none; FONT-FAMILY: "Calibri"; FONT-WEIGHT: normal; COLOR: #000000; FONT-STYLE: normal; DISPLAY: inline'>
<DIV style="FONT: 10pt tahoma">
<DIV> </DIV>
<DIV style="BACKGROUND: #f5f5f5">
<DIV style="font-color: black"><B>From:</B> <A title=pascaldragon@googlemail.com
href="mailto:pascaldragon@googlemail.com">Sven Barth</A> </DIV>
<DIV><B>Sent:</B> Sunday, September 21, 2014 12:33 AM</DIV>
<DIV><B>To:</B> <A title=fpc-devel@lists.freepascal.org
href="mailto:fpc-devel@lists.freepascal.org">FPC developers' list</A> </DIV>
<DIV><B>Subject:</B> Re: [fpc-devel] Suggestion: reference counted
objects</DIV></DIV></DIV>
<DIV> </DIV></DIV>
<DIV
style='FONT-SIZE: small; TEXT-DECORATION: none; FONT-FAMILY: "Calibri"; FONT-WEIGHT: normal; COLOR: #000000; FONT-STYLE: normal; DISPLAY: inline'>
<P>Am 21.09.2014 06:11 schrieb "Boian Mitov" <<A
href="mailto:mitov@mitov.com">mitov@mitov.com</A>>:<BR>><BR>> 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.</P>
<P>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.</P></DIV></DIV></DIV></BODY></HTML>