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

Make sure all instances of PartitionComponent come from the pool #2833

Merged
merged 1 commit into from
Nov 26, 2024

Conversation

AnsisMalins
Copy link
Collaborator

What does this PR change?

Make sure all instances of PartitionComponent come from the pool and return to it. This fixes a memory leak where VolatileScenePointers creates a new instance of PartitionComponent instead of taking one from the pool, and then later ReleaseReferenceComponentsSystem adds it to the pool. The pool receives components it did not create and grows endlessly.

Unit tests are exempt.

This change is one part of a series of changes to address #2694. It is turning out to be such a rabbit hole, so I'm splitting my work up into multiple pull requests.

How to test the changes?

  1. Launch the explorer
  2. Run around the world

The game should behave exactly the same as without this change.

Our Code Review Standards

https://github.com/decentraland/unity-renderer/blob/master/docs/code-review-standards.md

@DafGreco DafGreco self-requested a review November 26, 2024 11:39
Copy link

@DafGreco DafGreco left a comment

Choose a reason for hiding this comment

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

Validated on both platforms Windows and Macos ✅

Sanity check performed :

  • Backpack
  • Emotes
  • Teleporting to different places with music and auto-emoting
  • Music Festival
  • Genesis Plaza

@AnsisMalins AnsisMalins merged commit 1ab1715 into dev Nov 26, 2024
6 checks passed
@AnsisMalins AnsisMalins deleted the pool-partition-component branch November 26, 2024 12:36
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.

3 participants