Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I love the idea of ref counting, but I'm unsure about the handling of memory cycles. In a plain ref counting implementation, these will not be cleaned up, resulting in a memory leak.

I didn't find anything on cycles in the linked page, maybe the problem is not relevant in most real-world clojure code?



I don't know about "pure" Clojure (as this is), but in "pure" Erlang (which has similar semantics), you simply can't make a reference cycle. Functional languages in general don't really allow them.


Author here. As derefr said with Clojure semantics you can not create cycles.


Thanks, now I think about it, that makes a lot of sense.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: