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 leaking graphs when classes are injected by lifecycle bound graphs #142

Merged
merged 1 commit into from
Jun 18, 2024

Conversation

guyca
Copy link
Collaborator

@guyca guyca commented Jun 18, 2024

When a React construct component is injected by a lifecycle bound graph, the graph is retained in memory until the React construct is unmounted.

Injecting regular classes also contributed to the retention count which caused a bug as graphs are released on unmount.

This commit retains graphs only if the injection target is a React class component.

When a React construct component is injected by a lifecycle bound graph, the graph is retained in memory until the React construct is unmounted.

Injecting regular classes also contributed to the retention count which caused a bug as graphs are released on unmount.
@guyca guyca force-pushed the fixLeakWhenInjectingClasses branch from df4964e to d551bf5 Compare June 18, 2024 18:05
@guyca guyca merged commit 464319d into master Jun 18, 2024
2 checks passed
@guyca guyca deleted the fixLeakWhenInjectingClasses branch June 18, 2024 18:15
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