[MERGE] LRUCache._remove_node fix
John Arbash Meinel
john at arbash-meinel.com
Thu Apr 16 03:12:39 BST 2009
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
It seems that the new LRUCache code was missing a step when removing an
old node. We were removing the node from the dict, so it wouldn't be
found, and we were removing its 'value', so we were freeing some memory,
but we weren't removing the node from the linked list. We also wouldn't
be removing the 'key', so that tuple and the strings would still be
hanging around.
The patch is pretty simple, and the test does cover it.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAknmlBcACgkQJdeBCYSNAAOdCwCZAfXuPkcGclm63m1WTLJ9W12q
D7UAnjJFSHteltM0hNMhRISoVQgRlPDk
=5f1N
-----END PGP SIGNATURE-----
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: lru_ll_remove.patch
Url: https://lists.ubuntu.com/archives/bazaar/attachments/20090415/0240ecf8/attachment-0001.diff
More information about the bazaar
mailing list