<p>Am 25.10.2014 03:17 schrieb "Hans-Peter Diettrich" <<a href="mailto:DrDiettrich1@aol.com">DrDiettrich1@aol.com</a>>:<br>
>> - a class instance is destroyed once the reference count reaches zero (and Free does not work for them)<br>
><br>
><br>
> Shouldn't Free be usable as a finalizer, clearing all references to other objects within this instance?</p>
<p>One could do that (for now I've chosen the simple way). One would however need to check how this would be implemented best (e.g. it should be marked somehow so that the destructor later on does not try to work with already finalized fields; also all fields (Strings, arrays, interfaces, records, etc.) should be finalized so that it is consistent). Also it needs to be observed how other reference holders might react to that "zombie" instance. A further problem might be legacy code which gets passed a reference counted instance (on which ARCIncRef was called to keep it alive) and which then calls Free. Might not be the intended result by neither code... This might be the reason of Embarcadero to implement Free as a no-op and add a new DisposeOf which does what you suggested.</p>
<p>Regards,<br>
Sven</p>