[bug] MacOS/Win10 An new additional WebviewWindow does not terminate its process and not release memory when closed.
Describe the bug
After creating a new window according to the method from the APIs documentation, when it is closed, the process remains active and the allocated memory is not freed. If music was playing on the page, then it continues to play even after the window is closed.
const webview = new WebviewWindow('my-label', { url: 'https://github.com/tauri-apps/tauri' });
https://user-images.githubusercontent.com/19820469/195464919-2dedba15-737b-4e4f-9d18-2f1abcadf597.mp4
Reproduction
- Open DevTools from your App
- Use APIs for create new window from console
new window.__TAURI__.window.WebviewWindow('my-label', { url: 'https://github.com/tauri-apps/tauri' }); - Close the window
- The window process remains in the task manager. If the opened page had a sound accompaniment, then the music continues to play even after the window is closed.
Expected behavior
I expected a complete closure with the release of the occupied memory and the termination of the process in the same way as with the complete closure of the entire program.
Platform and versions
[email protected] tauri tauri
Environment › OS: Mac OS 12.6.0 X64 › Node.js: 16.17.1 › npm: 8.15.0 › pnpm: Not installed! › yarn: Not installed! › rustup: 1.25.1 › rustc: 1.64.0 › cargo: 1.64.0 › Rust toolchain: stable-x86_64-apple-darwin
Packages › @tauri-apps/cli [NPM]: 1.1.1 › @tauri-apps/api [NPM]: Not installed! › tauri [RUST]: 1.1.1, › tauri-build [RUST]: 1.1.1, › tao [RUST]: 0.14.0, › wry [RUST]: 0.21.1,
App › build-type: bundle › CSP: unset › distDir: ../src › devPath: ../src
App directory structure ├─ node_modules ├─ src-tauri ├─ .vscode └─ src
Stack trace
No response
Additional context
No response
Yes indeed - I hadn't really noticed up till now but I get the same using MacOS (12.6). The subwindow processes will remain alive despite the actual windows closing. The app needs to exit to close all the processes.
still present on new version 1.2
Sounds like https://github.com/tauri-apps/wry/issues/536 is back 🤔
I think yes. Part of the memory is not released, the sounds continue to play in the background without a window.
I am also experiencing something similar but just on windows.
Fixed in https://github.com/tauri-apps/wry/pull/754. Will be part of the next Wry release.
fixed with wry version v0.22.1