realm-kotlin
realm-kotlin copied to clipboard
Use GC to close `RealmReference`s
Currently, we use the VersionTracker
to close realms whose RealmReference
s that have been claimed by the GC.
This has two effects: first versions will not be reclaimed until there is some version advancement; second, closing realms would be done in the notifier/writer threads, instead of using the GC collector.
We should explore moving close and let the GC thread close and reclaim realms.
Hmm, not sure I agree with this. Having a deterministic lifecycle for these versions is pretty nice and makes it easier to reason about what is happening. But we can discuss it.