neo4j/neo4j — pull request #2686 by davidegrohmann (2014-07-16 09:48:38+00:00)
Title: Fix a memory leak in RerferenceCache

The leak was caused by the fact that when inserting new data in the cache
noone is cleaning up the old GCed values still present in the cache.
Indeed the cleanup was triggered only by updating existing node which have
been GCed or at some extend by getting GCed values.

This PR also tries to improve the polling when during get/remove by looking
to the whole queue instead of just removing the single element.