@ngxs/store 3.7.3-dev.master-8ecbd7f → 3.7.3-dev.master-cdd7ae3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/ngxs-store.umd.js +12 -0
- package/bundles/ngxs-store.umd.js.map +1 -1
- package/bundles/ngxs-store.umd.min.js +1 -1
- package/bundles/ngxs-store.umd.min.js.map +1 -1
- package/esm2015/src/internal/state-stream.js +10 -1
- package/esm5/src/internal/state-stream.js +13 -1
- package/fesm2015/ngxs-store.js +9 -0
- package/fesm2015/ngxs-store.js.map +1 -1
- package/fesm5/ngxs-store.js +12 -0
- package/fesm5/ngxs-store.js.map +1 -1
- package/ngxs-store.metadata.json +1 -1
- package/package.json +1 -1
- package/src/internal/state-stream.d.ts +3 -1
|
@@ -1921,6 +1921,18 @@
|
|
|
1921
1921
|
function StateStream() {
|
|
1922
1922
|
return _super.call(this, {}) || this;
|
|
1923
1923
|
}
|
|
1924
|
+
/**
|
|
1925
|
+
* @return {?}
|
|
1926
|
+
*/
|
|
1927
|
+
StateStream.prototype.ngOnDestroy = /**
|
|
1928
|
+
* @return {?}
|
|
1929
|
+
*/
|
|
1930
|
+
function () {
|
|
1931
|
+
// The `StateStream` should never emit values once the root view is removed, e.g. when the `NgModuleRef.destroy()` is called.
|
|
1932
|
+
// This will eliminate memory leaks in server-side rendered apps where the `StateStream` is created per each HTTP request, users
|
|
1933
|
+
// might forget to unsubscribe from `store.select` or `store.subscribe`, thus this will lead to huge memory leaks in SSR apps.
|
|
1934
|
+
this.complete();
|
|
1935
|
+
};
|
|
1924
1936
|
StateStream.decorators = [
|
|
1925
1937
|
{ type: core.Injectable }
|
|
1926
1938
|
];
|