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 font memory issues #211

Merged
merged 5 commits into from
Mar 2, 2022
Merged

Fix font memory issues #211

merged 5 commits into from
Mar 2, 2022

Conversation

wcandillon
Copy link
Contributor

Cherry-picked from the animation branch

@wcandillon wcandillon requested a review from chrfalch February 28, 2022 10:57
@wcandillon wcandillon self-assigned this Feb 28, 2022
@wcandillon
Copy link
Contributor Author

We could probably also cherry-pick the velocity bug fix as well as the loop yoyo fix.

Copy link
Contributor

@chrfalch chrfalch left a comment

Choose a reason for hiding this comment

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

  • Try to see if we can throw Javascript errors instead of asserting in the constructor

: JsiSkWrappingSkPtrHostObject(context, contourMeasure){};
const sk_sp<SkContourMeasure> contourMeasure)
: JsiSkWrappingSkPtrHostObject(context, contourMeasure) {
assert(contourMeasure != nullptr);
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't we throw a JS error - this assert will just make the app unexpectedly quit?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thankfully the only call to this constructor checks for null pointer. but update the code to throw.

@wcandillon wcandillon requested a review from chrfalch March 1, 2022 21:42
Copy link
Contributor

@chrfalch chrfalch left a comment

Choose a reason for hiding this comment

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

LGTM

@wcandillon wcandillon merged commit 4f8f831 into main Mar 2, 2022
@wcandillon wcandillon deleted the fix/font-memory-issues branch March 14, 2022 08:51
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.

2 participants