-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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 some clones not getting removed when sprite is deleted #2358
Open
apple502j
wants to merge
1
commit into
scratchfoundation:develop
Choose a base branch
from
apple502j:remove-clone-handle
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
thanks @apple502j! Our process is currently that PRs will be reviewed after our team assigns a priority label to the corresponding issue. Thanks for your patience. |
adroitwhiz
added a commit
to adroitwhiz/scratch-vm
that referenced
this pull request
Mar 19, 2023
This cleans up the code around sprite deletion and disposal: - All clones are now disposed of when a sprite is deleted. A previous bug (scratchfoundation#2358) was causing only half the clones to be disposed. - deleteMonitors has been moved from Runtime.dispose into RenderedTarget.dispose. - RenderedTarget.dispose now calls its superclass method Target.dispose before disposing itself, which removes the need to call removeExecutable itself. Target.dispose is no longer marked abstract as a result. These changes were motivated by a desire to rework monitor cleanup and deletion, which are part of a larger refactor of monitor blocks to help implement target-specific monitors for extensions.
adroitwhiz
added a commit
to adroitwhiz/scratch-vm
that referenced
this pull request
Jun 16, 2024
This cleans up the code around sprite deletion and disposal: - All clones are now disposed of when a sprite is deleted. A previous bug (scratchfoundation#2358) was causing only half the clones to be disposed. - deleteMonitors has been moved from Runtime.dispose into RenderedTarget.dispose. - RenderedTarget.dispose now calls its superclass method Target.dispose before disposing itself, which removes the need to call removeExecutable itself. Target.dispose is no longer marked abstract as a result. These changes were motivated by a desire to rework monitor cleanup and deletion, which are part of a larger refactor of monitor blocks to help implement target-specific monitors for extensions.
adroitwhiz
added a commit
to adroitwhiz/scratch-vm
that referenced
this pull request
Jun 18, 2024
This cleans up the code around sprite deletion and disposal: - All clones are now disposed of when a sprite is deleted. A previous bug (scratchfoundation#2358) was causing only half the clones to be disposed. - deleteMonitors has been moved from Runtime.dispose into RenderedTarget.dispose. - RenderedTarget.dispose now calls its superclass method Target.dispose before disposing itself, which removes the need to call removeExecutable itself. Target.dispose is no longer marked abstract as a result. These changes were motivated by a desire to rework monitor cleanup and deletion, which are part of a larger refactor of monitor blocks to help implement target-specific monitors for extensions.
adroitwhiz
added a commit
to adroitwhiz/scratch-vm
that referenced
this pull request
Jun 19, 2024
This cleans up the code around sprite deletion and disposal: - All clones are now disposed of when a sprite is deleted. A previous bug (scratchfoundation#2358) was causing only half the clones to be disposed. - deleteMonitors has been moved from Runtime.dispose into RenderedTarget.dispose. - RenderedTarget.dispose now calls its superclass method Target.dispose before disposing itself, which removes the need to call removeExecutable itself. Target.dispose is no longer marked abstract as a result. These changes were motivated by a desire to rework monitor cleanup and deletion, which are part of a larger refactor of monitor blocks to help implement target-specific monitors for extensions.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves
Resolves #2357
Proposed Changes
Fixes
VM.deleteSprite
by removing the first clone N times, rather than removing the clone using the index.Reason for Changes
Previous code was like this:
Run it on Scratch and see what's wrong...
Test Coverage
Manually tested.
note: please review PR about another bug related to deletion and clone too: #2353