From 32128374c9aec27c80bb73e91e3277e35ac65e83 Mon Sep 17 00:00:00 2001 From: VladimirAmiorkov Date: Thu, 4 Oct 2018 10:19:52 +0300 Subject: [PATCH] fix: Clear the "view" to avoid left over referenced once the View is detached and should be collected by GC --- tns-core-modules/ui/styling/style-scope.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tns-core-modules/ui/styling/style-scope.ts b/tns-core-modules/ui/styling/style-scope.ts index 8e0df7dd14..f6ae530e77 100644 --- a/tns-core-modules/ui/styling/style-scope.ts +++ b/tns-core-modules/ui/styling/style-scope.ts @@ -377,6 +377,9 @@ export class CssState { public onUnloaded(): void { this.unsubscribeFromDynamicUpdates(); + this.view = undefined; + this._matchInvalid = false; + this._match = undefined; } @profile