Maybe D is right about GC after all !

Russel Winder russel at winder.org.uk
Wed Dec 20 19:27:04 UTC 2017


On Wed, 2017-12-20 at 17:05 +0000, Tony via Digitalmars-d wrote:
> I have heard with regard to reference counting as is done in 
> Python, that if two objects each have a reference to the other, 
> that they will never be deleted, even if neither is used 
> elsewhere in the program. Garbage collection is not supposed to 
> have that issue, although I don't know how a garbage collector 
> determines that there usage is just via each other and that they 
> can be deleted.

Python uses reference counting, but also has an optional garbage
collector.

cf. https://docs.python.org/3/library/gc.html#module-gc

-- 
Russel.
===========================================
Dr Russel Winder      t: +44 20 7585 2200
41 Buckmaster Road    m: +44 7770 465 077
London SW11 1EN, UK   w: www.russel.org.uk
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20171220/bdb4a5d3/attachment.sig>


More information about the Digitalmars-d mailing list