4 ms·
Nope, all those languages are garbage collected.
by juliangregorian 12y ago
Nope, all those languages are garbage collected.
- zo1 12y agoCPython uses reference counting. Links: http://www.quora.com/How-does-garbage-collection-in-Python-work?share=1 http://www.quora.com/How-does-garbage-collection-in-Python-w... https://docs.python.org/2/library/gc.html https://docs.python.org/2/library/gc.html
- david-given 12y agoReference counting is a form of garbage collection, although a very bad one. And I don't know about the others, but Python does use reference counting, although it combines it with another garbage collection algorithm to avoid some of reference counting's most egregious failures (it not being able to collect cycles).
- duaneb 12y agoReference counting isn't even very bad; for certain patterns of allocation, it's even optimal. However, for certain people, having to manually deal with cycles is enough to switch to a mark-and-sweep type collection mechanism. See: Apple opting for ARC over mark-and-sweep GC.