Hi Ron, I think the persistent collections are no different from any other collections from a GC perspective in that you control which references you keep and for how long in your code. After "modification" some nodes may no longer be referenced and will be eligible for GC so I'm not sure what you mean by "not necessarily short lived". Surely what is short lived is completely dependent on the use case?
Also, since they are sharing structure they must be better than copy-on-write collections for object creation. That is the whole point. Obviously, compared to mutable collections there is some overhead due to additional node creation but that's a trade off and not relevant to your point about long lived objects. Paudi On 7 February 2012 16:16, pron <ron.press...@gmail.com> wrote: > Hi. I have a question: > I love Clojure's persistent collections, but don't they generate many > long-lived objects (that go to the surving generations) that are hard to > garbage-collect? After all, the discarded nodes after "modification" are > not necessarily short lived. It seems like they would behave badly from the > GC perspective. Am I wrong? > > -- > 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 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