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