Pārlūkot izejas kodu

fix(runtime-core): ensure app instance can be garbage collected after unmount (close #2907) (#2909)

close #2907

Co-authored-by: Thorsten Luenborg <t.luneborg@googlemail.com>
Thorsten Lünborg 5 gadi atpakaļ
vecāks
revīzija
60e05eff23
1 mainītis faili ar 1 papildinājumiem un 0 dzēšanām
  1. 1 0
      packages/runtime-core/src/apiCreateApp.ts

+ 1 - 0
packages/runtime-core/src/apiCreateApp.ts

@@ -272,6 +272,7 @@ export function createAppAPI<HostElement>(
           if (__DEV__ || __FEATURE_PROD_DEVTOOLS__) {
             devtoolsUnmountApp(app)
           }
+          delete app._container.__vue_app__
         } else if (__DEV__) {
           warn(`Cannot unmount an app that is not mounted.`)
         }