Fork me on GitHub
#core-async
<
2019-10-26
>
dehli03:10:55

Hello, I have promise-chans that I create (but don't close) in a handler. Can this be a cause of a memory leak?

hiredman03:10:59

Not in and of itself

hiredman03:10:19

Channels and promise-chans are not global things, and are GC able without being closed

dehli03:10:08

thanks! i'm experiencing some weird behavior and trying to rule out possibilities 🙂

hiredman03:10:04

Timeout channels can cause retaining more memory then expected, because the time keeper(which is global) has to maintain a reference to timeout channels until they expire, and the timeout channel will keep any go blocks waiting on them, and any memory they using from being gc'ed

❤️ 4
👍 4
dehli03:10:43

gotcha, that makes sense! thanks for the explanation