On Dec 5, 4:59 pm, Paul  Mooser <[EMAIL PROTECTED]> wrote:
> The memory profiler says that the following object is a GC root which
> is holding onto the collection being passed into the filter call:
>
> clojure.core$filter__3364$fn__3367

That class should be the instance of the anonymous fn you defined in
your filter.

Here's an experiment -- make the filter a normal function, i.e.:

(def *m*   ... fill in your map here ...)

(defn my-filter [document]
     (let [item (. document get Constants/ITEM_ID)]
       (contains? *m* item)))

(defn documents-from-vendors [doc-seq]
    (filter my-filter doc-seq))

Does it still blow up?

-Stuart Sierra
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to