Hi all, I'm trying to understand the object retention behavior when subseq is applied to sorted collections.
A quick glance at the source of APersistentTreeMap.java<https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/PersistentTreeMap.java> suggests that the reified subseq only contains pointers to nodes to the left or right of the initial value node. Assuming I'm reading correctly, that means subseq should never retain unaccessible nodes in the original sorted map or set. Here's an experiment that seems to back that up: https://gist.github.com/brandonbloom/6101597 This produces a few questions: 1. Is my experiment good? 2. What is the cause of the "double" finalizations? It seems like every object has an initial speculative finalize fail on it... Why? 3. Am I correct in saying that subseq will never retain extra objects from the original tree? Thanks, Brandon -- -- 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 Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.