[fpc-devel] Suggestion: reference counted objects

Boian Mitov mitov at mitov.com
Sun Sep 21 06:10:42 CEST 2014

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.

With best regards,
Boian Mitov

Mitov Software
-----Original Message----- 
From: Hans-Peter Diettrich
Sent: Saturday, September 20, 2014 8:14 PM
To: FPC developers' list
Subject: Re: [fpc-devel] Suggestion: reference counted objects

Boian Mitov schrieb:
ACK - except for Weak references. Weak references turn the conservative
memory management into an aggresive/optimistic one, with unpredictable

IMO Weak references should be reserved for users who accept possible
consequential problems, but should never be used in standard libraries.
At least I'd suggest to make weak references subject to an compiler
switch, so that every user has a chance to disable them in case of trouble.


fpc-devel maillist  -  fpc-devel at lists.freepascal.org

More information about the fpc-devel mailing list