radical ideas about GC and ARC : need to be time driven?
Jacob Carlborg via Digitalmars-d
digitalmars-d at puremagic.com
Tue May 13 06:21:04 PDT 2014
On 13/05/14 13:46, Kagamin wrote:
> BTW, I don't see how ARC would be more able to call destructors, than
> GC. If ARC can call destructor, so can GC. Where's the difference?
The GC will only call destructors when it deletes an object, i.e. when
it runs a collection. There's no guarantee that a collection will
happen. With ARC, as soon as a reference goes out of scope it's
decremented. If the reference count then goes to zero it will call the
destructor and delete the object.
--
/Jacob Carlborg
More information about the Digitalmars-d
mailing list