Nick Coghlan <ncoghlan <at> gmail.com> writes: > > I agree this is a problem, but I'm struggling to think of possible > solutions that aren't either horrendously complicated or completely > contrary to the idea of view-based dicts. Keeping a count of the number of views currently alive for a given weak dict doesn't seem "horrendously complicated" (*). Once this count falls to zero, you can purge all the dead weakrefs from the dict (their keys would have been previously queued, so that purging is O(dead weakrefs) and not O(dict length)). (*) the most complicated is probably to write the view classes themselves
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4