refactor(compiler): remove unused subscriptions in view

This commit is contained in:
Tobias Bosch
2016-10-31 09:40:29 -07:00
committed by vsavkin
parent 1de04b23b1
commit 97471d74b6
3 changed files with 3 additions and 11 deletions

View File

@ -33,7 +33,6 @@ export abstract class AppView<T> {
rootNodesOrAppElements: any[];
allNodes: any[];
disposables: Function[];
subscriptions: any[];
contentChildren: AppView<any>[] = [];
viewChildren: AppView<any>[] = [];
viewContainerElement: AppElement = null;
@ -98,13 +97,10 @@ export abstract class AppView<T> {
*/
createInternal(rootSelectorOrNode: string|any): AppElement { return null; }
init(
rootNodesOrAppElements: any[], allNodes: any[], disposables: Function[],
subscriptions: any[]) {
init(rootNodesOrAppElements: any[], allNodes: any[], disposables: Function[]) {
this.rootNodesOrAppElements = rootNodesOrAppElements;
this.allNodes = allNodes;
this.disposables = disposables;
this.subscriptions = subscriptions;
if (this.type === ViewType.COMPONENT) {
// Note: the render nodes have been attached to their host element
// in the ViewFactory already.
@ -164,9 +160,6 @@ export abstract class AppView<T> {
for (var i = 0; i < this.disposables.length; i++) {
this.disposables[i]();
}
for (var i = 0; i < this.subscriptions.length; i++) {
this.subscriptions[i].unsubscribe();
}
this.destroyInternal();
this.dirtyParentQueriesInternal();