Hi, I'm just playing around with some ideas.
When I create a shared library for usage e.g. with Java, do I get garbage collection for free when destroying objects used only within this library and not outside?
I am not sure I understood correctly.
Any ref-ed object on the heap is garbage-collected. So if your Nim library, called by Java, internally makes use of them, then you get garbage collection "for free".
The only thing I am not sure of is whether or not one can access ref objects from another language. If so (which is currently unlikely as hinted in the documentation), I have no idea of how these would be handled...