I'm a bit unsure of which channels will be collected and which will remain 
and potentially result in an out of memory error. I'd like to understand 
when I should close, unsub and untap channels to avoid leaks. It feels like 
a very difficult task to verify there are no leaks.

For example:

(defn read-one-msg [source]
 (let [c (async/chan)]
  (async/sub source :msg c)
  (async/<!! c)))

Will this leak c, should I manually unsub it?

I constantly stumble on this kind of questions so I'd like to understand 
better how to deal with these situations.

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your 
first post.
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
--- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to