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 a memory leak in the 2D particle emitter #6278

Merged
merged 1 commit into from
Jan 26, 2024
Merged

Fix a memory leak in the 2D particle emitter #6278

merged 1 commit into from
Jan 26, 2024

Conversation

D8H
Copy link
Collaborator

@D8H D8H commented Jan 26, 2024

Fixes #6125
Fixes #3496

@D8H D8H requested a review from 4ian as a code owner January 26, 2024 10:47
@@ -430,6 +432,7 @@ namespace gdjs {

destroy(): void {
this.emitter.destroy();
this._particleTexture.destroy();
Copy link
Owner

Choose a reason for hiding this comment

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

Great fix

Copy link
Owner

@4ian 4ian left a comment

Choose a reason for hiding this comment

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

As discussed, let's see if this could be cached between instances according to the object data?

@D8H D8H merged commit 40b0823 into master Jan 26, 2024
6 checks passed
@D8H D8H deleted the fix-particle-leak branch January 26, 2024 11:23
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.

Renderer crashes after spawning 96000 particle emitters Particle emitter has a huge memory issue
2 participants