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

Reduce the number of retain cycles between host and guest #2029

Merged
merged 3 commits into from
May 15, 2024

Conversation

swankjesse
Copy link
Collaborator


  • CHANGELOG.md's "Unreleased" section has been updated, if applicable.

@swankjesse swankjesse requested review from JakeWharton and dnagler May 15, 2024 20:02
Copy link
Collaborator

@JakeWharton JakeWharton left a comment

Choose a reason for hiding this comment

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

Nice

CHANGELOG.md Outdated
@@ -12,6 +12,7 @@ Changed:
- APIs accepting a `FileSystem` and `Path` now have the `FileSystem` coming before the `Path` in the parameter list. Compatibility functions are retained for this version, but will be removed in the next version.

Fixed:
- Fix memory leaks caused by reference cycles on iOS. We got into trouble mixing garbage-collected Kotlin objects with reference-counted Swift objects.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you do a quick rebase? I released these notes a few hours ago and there's a new "Unreleased" section now.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oooh yep. Done.

@swankjesse swankjesse force-pushed the jwilson.0515.break_the_cycle branch from 7ffef9b to a6b742f Compare May 15, 2024 20:07
@swankjesse swankjesse enabled auto-merge (squash) May 15, 2024 20:07
@swankjesse
Copy link
Collaborator Author

Ooooh darn.

e: file:///Users/runner/work/redwood/redwood/test-app/schema/protocol-host/build/generated/redwood/sources/com/example/redwood/testapp/protocol/host/redwoodlazylayout/ProtocolRefreshableLazyList.kt:112:17 Implementing function interface is prohibited in JavaScript

}
if (trait.parameterTypes.isEmpty()) {
beginControlFlow("{")
addStatement(
"%L(json, change.id, eventSink)::invoke",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Uuuuuggghhh I hate it. So wasteful. I wonder if ES6 or K2 or both will remove that implementation limitation for future optimization.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Same.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@swankjesse swankjesse merged commit 3b30062 into trunk May 15, 2024
10 checks passed
@swankjesse swankjesse deleted the jwilson.0515.break_the_cycle branch May 15, 2024 21:22
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.

3 participants