3 ms·
Python still uses mark and sweep occasionally to clean up structures where reference counting fails.
by ygra 7y ago
Python still uses mark and sweep occasionally to clean up structures where reference counting fails.
- mailslot 7y agoIt has optional cycle detection, yep. But... you could also just spend a couple of minutes to not have cyclic references.
- mantap 7y agoClosures are objects that can participate in cycles. And the lifetime of closures is very hard to track statically.
- mailslot 7y agoThey are and they should be used responsibly. I’d argue sparingly also.
- Dylan16807 7y ago"A couple of minutes" Just a little bit overconfident.