Skip to content
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

feat: object deinit on the main thread #3633

Merged
merged 5 commits into from
Jul 18, 2023
Merged

feat: object deinit on the main thread #3633

merged 5 commits into from
Jul 18, 2023

Conversation

danil-pavlov
Copy link
Contributor

No description provided.

Base automatically changed from 1-9-0-docs-update to master July 6, 2023 15:13
@KotlinBuild KotlinBuild closed this Jul 6, 2023
@sarahhaggarty sarahhaggarty reopened this Jul 6, 2023
Copy link
Member

@koshachy koshachy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, take a look at the comments.

docs/topics/native/native-ios-integration.md Show resolved Hide resolved
```

* If Swift/Objective-C objects are passed to Kotlin on a thread other than main or if the main dispatch queue isn't processed,
Copy link
Member

@koshachy koshachy Jul 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this bullet should be a list?
Something like:

Kotlin calls deinit on the S/O objects on a specific GC thread, if:

  • S/O objects are passed to Kotlin on a thread other than the main
  • Main dispatch queue isn't processed (by the GC?)

If you want to call deinit on .... explicitly, set in your gradle.properties. This property enables deinit calls, even if these objects are passed to Kotlin on the main thread.

docs/topics/native/native-ios-integration.md Outdated Show resolved Hide resolved
Copy link
Member

@koshachy koshachy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@danil-pavlov danil-pavlov merged commit 3d485b0 into master Jul 18, 2023
4 checks passed
@danil-pavlov danil-pavlov deleted the threads-deinit branch July 18, 2023 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants