Re:Three bad things: threads, garbage collection, and nondet...
by btilly on Monday August 16, 2010 @11:21PM
(#1610142)
With reference counting, those issues are never caught.
Re:Three bad things: threads, garbage collection, and nondet...
by j_baker on Tuesday August 17, 2010 @11:33AM
(#1611395)
It's not just about reference counting though. It's a weakness of deterministic destructors. When you have a reference cycle, it's impossible to call destructors deterministically even if you aren't using reference counting.
This behavior isn't even guaranteed in CPython (and never has been as far as I know). There's a problem with deterministic destructors and refcounting: if there's a reference cycle, which destructor gets called first?
Even the cyclic garbage collector won't pick this up. These kinds of issues come up more and more if you rely on python's __del__ methods (aka destructors). The solution? Quit complaining and just use a with block. It isn't that bad.