You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am writing to bring to your attention a potential memory leak issue that I discovered in the ngrx store component.
As an avid user of the library, I noticed some behaviors that suggest there might be a problem when overriding the ngOnDestroy method,
where the parent class does not release resources properly.
Description of the Issue:
Upon thorough analysis, I suspect that the store component may be causing a memory leak when the ngOnDestroy method is overridden. The parent class will not be called, and as a result and resources will not release, which may lead to inefficient memory utilization.
Expected Behavior:
When overriding the onDestory you should add super.onDestory()
Impact:
A memory leak issue can severely impact the performance and stability of applications using the ngrx store-component. It can lead to increased memory consumption, decreased performance, and even application crashes in severe cases.
Information
I am writing to bring to your attention a potential memory leak issue that I discovered in the ngrx store component.
As an avid user of the library, I noticed some behaviors that suggest there might be a problem when overriding the ngOnDestroy method,
where the parent class does not release resources properly.
Description of the Issue:
Upon thorough analysis, I suspect that the store component may be causing a memory leak when the ngOnDestroy method is overridden. The parent class will not be called, and as a result and resources will not release, which may lead to inefficient memory utilization.
Expected Behavior:
When overriding the onDestory you should add super.onDestory()
Relevant Code Snippet:
/** Completes all relevant Observable streams. */ ngOnDestroy() { this.stateSubject$.complete(); this.destroySubject$.next(); }
Impact:
A memory leak issue can severely impact the performance and stability of applications using the ngrx store-component. It can lead to increased memory consumption, decreased performance, and even application crashes in severe cases.
Documentation page
https://v15.ngrx.io/guide/component-store/lifecycle#ondestroy
I would be willing to submit a PR to fix this issue
The text was updated successfully, but these errors were encountered: