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: combined avatar mesh leak #1230
Conversation
After the CI passes:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good, there is an unintended if with nothing in it.
@@ -415,6 +424,10 @@ private IEnumerator LoadAvatar() | |||
// TODO(Brian): Evaluate using UniTask<T> instead of this way. | |||
yield return new WaitUntil(() => bodyShapeController.isReady && wearableControllers.Values.All(x => x.isReady)); | |||
|
|||
if ( eyesController == null || eyebrowsController == null || mouthController == null ) | |||
{ | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You might want to delete this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested with no problems! let's just address Kinerius comment
What does this PR change?
How to test the changes?
clientDebug.InstantiateBotsAtCoords({ amount: 200 })
clientDebug.ClearBots()
.Notice that when doing this in
master
a lot of dangling meshes can be seen on Unity's profiler, incurring a leak of around 2.4 mb per avatar.On the version of this PR, the meshes should be destroyed and the memory freed.
Our Code Review Standards
https://github.com/decentraland/unity-renderer/blob/master/docs/code-review-standards.md