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

Editor: Disposes object's helper when removing helper #28614

Merged
merged 1 commit into from
Jun 10, 2024

Conversation

ycw
Copy link
Contributor

@ycw ycw commented Jun 10, 2024

Description

This PR disposes the object's helper when editor.removeHelper(object), s.t. it won't leak helper's geometry.

VertexNormalHelper's geometry size is variant, and it casually holds thousands of f32s for example:

image

@@ -469,6 +469,7 @@ Editor.prototype = {

var helper = this.helpers[ object.id ];
helper.parent.remove( helper );
helper.dispose();
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since all helpers have a dispose() method, this call is safe.

@Mugen87 Mugen87 added this to the r166 milestone Jun 10, 2024
@Mugen87 Mugen87 merged commit 6255319 into mrdoob:dev Jun 10, 2024
11 checks passed
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