-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Aligning realm references from writer results and public realm #481
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me 👍 . This looks pretty easy to stumble into by accident, but not sure if there is a pattern we can employ that makes it easier to avoid mistakes. It can be in another PR anyway.
We should probably also update the changelog as this is an issue also present in our current release.
test/base/src/androidTest/kotlin/io/realm/test/shared/MutableRealmTests.kt
Outdated
Show resolved
Hide resolved
// cleared due some thresholds or outcome of GC not being predictable. | ||
// https://github.com/realm/realm-kotlin/issues/486 | ||
@Ignore | ||
fun clearingRealmObjectReleasesRealmReference() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test also failed before any of the reworks in this PR, so should IMO not prevent the actual fix of the PR to get merged. The test failing could just be a a symptom of our ability to reason about the outcome of GC on Native but could also be highlighting another issue. This was not checked before as the objects returned from write
didn't actually reference the same version as we were tracking in RealmImpl
. Added #486 to track investigation of this separately.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👏
Closes #477