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

Cleaned up material references in render component # onRemove #4126

Merged
merged 2 commits into from
Mar 18, 2022

Conversation

yaustar
Copy link
Contributor

@yaustar yaustar commented Mar 16, 2022

Fixes #4124

I confirm I have read the contributing guidelines and signed the Contributor License Agreement.

@yaustar yaustar requested a review from a team March 16, 2022 12:30
@yaustar yaustar self-assigned this Mar 16, 2022
@willeastcott
Copy link
Contributor

Hey @mvaligursky - since you own the RenderComponent, can you review this one please? 😄

@yaustar
Copy link
Contributor Author

yaustar commented Mar 18, 2022

Request re-review please @mvaligursky

The EntityReference doesn't need to be manually cleaned up as it listens for the remove event on the component and cleans itself up.

This does mean we have an inconsistency between EntityReference and AssetReference where one needs to be cleanup when the owner is destroy and the other manages itself.

@yaustar yaustar merged commit 1967983 into main Mar 18, 2022
@yaustar yaustar deleted the render-component-material-cleanup-2 branch March 18, 2022 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Memory leak: RenderComponent with material asset keeps stale references on pc.app.assets._callbacks
4 participants