Skip to content

Commit

Permalink
fix(modal): fix memory leak for TemplateRef modals (#3179)
Browse files Browse the repository at this point in the history
  • Loading branch information
IlyaSurmay authored and valorkin committed Dec 4, 2017
1 parent f5679eb commit d5d1acf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/component-loader/component-loader.class.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,9 @@ export class ComponentLoader<T> {
this._viewContainerRef.indexOf(this._contentRef.viewRef)
);
}
if (this._contentRef.viewRef) {
this._contentRef.viewRef.destroy();
}
// this._viewContainerRef.remove(this._viewContainerRef.indexOf(this._componentRef.hostView));
//
// if (this._contentRef.viewRef && this._viewContainerRef.indexOf(this._contentRef.viewRef) !== -1) {
Expand Down

0 comments on commit d5d1acf

Please sign in to comment.