[fpc-devel] Suggestion: reference counted objects
Marco van de Voort
marcov at stack.nl
Sun Sep 21 12:58:21 CEST 2014
In our previous episode, Hans-Peter Diettrich said:
> 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.
IMHO weak references trade one manual memory system in for a different
manual memory system.
The hard part of manual memory systems, figuring out how a complex dynamic
structure deallocates (that is usually tackled by having a bit of design and
thought go into it), remains.
More information about the fpc-devel