<< Back to previous view

[CLJ-746] Unreference keywords not correctly removed from keyword table (Utils.clearCache) Created: 25/Feb/11  Updated: 04/Mar/11  Resolved: 04/Mar/11

Status: Closed
Project: Clojure
Component/s: None
Affects Version/s: Release 1.3
Fix Version/s: None

Type: Defect Priority: Major
Reporter: Hugo Duncan Assignee: Unassigned
Resolution: Declined Votes: 0
Labels: None


I just ran into http://dev.clojure.org/jira/browse/CLJ-444 in clojure 1.2 and think the anlaysis there missed the cause of the issue.

Reading http://download.oracle.com/javase/1.4.2/docs/api/java/lang/ref/ReferenceQueue.html#poll() suggests poll removes an item from the queue.

In Util.clearCache, there are two calls to rq.poll() with discarded return values, with the result that some of the enqueued soft references are not being removed from cache (ie the keyword table)

Comment by Stuart Halloway [ 04/Mar/11 9:49 PM ]

The references do not need to be removed using the queue. They can be (and are) removed by directly walking the values of the map. The queue serves only to notify that this work needs to be done.

Generated at Fri Jan 19 13:57:03 CST 2018 using JIRA 4.4#649-r158309.