Alexandre Vassalotti <alexan...@peadrop.com> added the comment: > Why do you need all this? Isn't it enough to take a weakref and check > the callback is triggered?
No, because you would need a weak reference to the instance's __dict__, which is unavailable for io.StringIO. Anyway, here's a simplified patch without the fun experimental code. :-) ---------- Added file: http://bugs.python.org/file14246/fix_refleak_stringio-3.diff _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue6242> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com