Yah, I thought about this as well. The best solution is to make `RefCounted` use GC instead of malloc. That way any cycles or refcounted objects in heap will be lifted by the GC. I'll integrate that change with this pull request.