From: Thorsten Lünborg Date: Wed, 3 Feb 2021 18:09:20 +0000 (+0100) Subject: fix(runtime-core): ensure app instance can be garbage collected after unmount (close... X-Git-Tag: v3.0.6~62 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=60e05eff232c3ddfca1c20e52f72aa36165d8a22;p=thirdparty%2Fvuejs%2Fcore.git fix(runtime-core): ensure app instance can be garbage collected after unmount (close #2907) (#2909) close #2907 Co-authored-by: Thorsten Luenborg --- diff --git a/packages/runtime-core/src/apiCreateApp.ts b/packages/runtime-core/src/apiCreateApp.ts index bcb2fec1c3..2896937045 100644 --- a/packages/runtime-core/src/apiCreateApp.ts +++ b/packages/runtime-core/src/apiCreateApp.ts @@ -272,6 +272,7 @@ export function createAppAPI( if (__DEV__ || __FEATURE_PROD_DEVTOOLS__) { devtoolsUnmountApp(app) } + delete app._container.__vue_app__ } else if (__DEV__) { warn(`Cannot unmount an app that is not mounted.`) }