@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
package/fesm5/ngxs-store.js
CHANGED
|
@@ -1703,6 +1703,18 @@ var StateStream = /** @class */ (function (_super) {
|
|
|
1703
1703
|
function StateStream() {
|
|
1704
1704
|
return _super.call(this, {}) || this;
|
|
1705
1705
|
}
|
|
1706
|
+
/**
|
|
1707
|
+
* @return {?}
|
|
1708
|
+
*/
|
|
1709
|
+
StateStream.prototype.ngOnDestroy = /**
|
|
1710
|
+
* @return {?}
|
|
1711
|
+
*/
|
|
1712
|
+
function () {
|
|
1713
|
+
// The `StateStream` should never emit values once the root view is removed, e.g. when the `NgModuleRef.destroy()` is called.
|
|
1714
|
+
// This will eliminate memory leaks in server-side rendered apps where the `StateStream` is created per each HTTP request, users
|
|
1715
|
+
// might forget to unsubscribe from `store.select` or `store.subscribe`, thus this will lead to huge memory leaks in SSR apps.
|
|
1716
|
+
this.complete();
|
|
1717
|
+
};
|
|
1706
1718
|
StateStream.decorators = [
|
|
1707
1719
|
{ type: Injectable }
|
|
1708
1720
|
];
|