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 BitmapText double destroy bug #378

Merged
merged 2 commits into from
Jan 20, 2023
Merged

Fix BitmapText double destroy bug #378

merged 2 commits into from
Jan 20, 2023

Conversation

baseten
Copy link
Collaborator

@baseten baseten commented Jan 19, 2023

Fixes: #367

Changes

  • Call willUnmount iteratively during unmount
  • Defer to PIXI to do object destruction to prevent double destroy call
  • Add test for willUnmount/destroy calls

@baseten baseten requested a review from Zyie January 19, 2023 14:28
Comment on lines +40 to +41
// TODO: should we call willUnmount anyway irrespective of whether destroyChildren is true?
willUnmountRecursive(c, child);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@Zyie I'm wondering whether we should just call willUnmount on children anyway whether or not destroyChildren is true - technically the child is about to unmount irrespective of whether it's being destroyed

@baseten baseten changed the base branch from pixi-v7 to master January 19, 2023 15:14
@baseten baseten merged commit 23b26af into master Jan 20, 2023
@baseten baseten deleted the fix-bitmaptext-bug branch January 20, 2023 10:33
jdefting pushed a commit to jdefting/pixi-react that referenced this pull request Sep 11, 2023
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.

BitmapText errors on unmount
2 participants