this._parentOrParents = null;
this._subscriptions = null;
if (unsubscribe) {
+ this._ctorUnsubscribe = true;
this._unsubscribe = unsubscribe;
}
}
if (this.closed) {
return;
}
- let { _parentOrParents, _unsubscribe, _subscriptions } = this;
+ let { _parentOrParents, _ctorUnsubscribe, _unsubscribe, _subscriptions } = this;
this.closed = true;
this._parentOrParents = null;
this._subscriptions = null;
}
}
if (isFunction(_unsubscribe)) {
+ if (_ctorUnsubscribe) {
+ this._unsubscribe = undefined;
+ }
try {
_unsubscribe.call(this);
}