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

fix: add missing dispose and typename to skparagraph #2570

Merged

Conversation

terrysahaidak
Copy link
Contributor

Since there is no dispose method on JsiSkHostObject i had to add my own. Tested it on a project with huge paragraph usage - no crashes.

@NikitaDudin
Copy link
Contributor

Seems like dispose method existing and already exported in parent class JsiSkHostObject:

JSI_HOST_FUNCTION(dispose) {
safeDispose();
return jsi::Value::undefined();
}

@terrysahaidak
Copy link
Contributor Author

terrysahaidak commented Aug 7, 2024

Seems like dispose method existing and already exported in parent class JsiSkHostObject:

JSI_HOST_FUNCTION(dispose) {
safeDispose();
return jsi::Value::undefined();
}

The name of the class you are referring to is JsiSkWrappingHostObject, it extends the base class JsiSkHostObject and adds the dispose method.

template <typename T> class JsiSkWrappingHostObject : public JsiSkHostObject {

@terrysahaidak
Copy link
Contributor Author

I just noticed that __typename__ macros is missing too, will add it as well

@terrysahaidak terrysahaidak changed the title fix: add missing dispose to skparagraph fix: add missing dispose and typename to skparagraph Aug 7, 2024
@wcandillon wcandillon self-assigned this Aug 7, 2024
@wcandillon
Copy link
Contributor

can you run clang-format on it?

@terrysahaidak
Copy link
Contributor Author

@wcandillon done

@wcandillon wcandillon self-requested a review August 22, 2024 07:54
@wcandillon wcandillon merged commit 9de8da3 into Shopify:main Aug 22, 2024
11 checks passed
Copy link
Contributor

🎉 This issue has been resolved in version 1.3.11 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants