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

refactor(core): create instances' objects on commit #44

Merged
merged 6 commits into from
Jun 13, 2022

Conversation

CodyJasonBennett
Copy link
Member

@CodyJasonBennett CodyJasonBennett commented Jun 13, 2022

Solves a longstanding issue of OGL's constructor side-effects by creating instances' objects on commit mount instead of alongside instance creation. Instead, instances are descriptors that will create an OGL element once finalized and managed in the tree. This prevents GPU memory leaks that would arise when using suspense or concurrent features whenever instances are discarded and later recreated. Effectful constructors are not a good design, but this way, we work around them.

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.

1 participant