-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[bug] on macOS call systray set_icon will cause memory leak #5382
Comments
This comment was marked as off-topic.
This comment was marked as off-topic.
This is not only limited to |
Currently able to repro on MacOS using Tauri |
Digging deeper it looks like this may be the cause: Possible alternative here that may solve this in the future tauri-apps/wry#1239 Specifically for tray icon: tauri-apps/tray-icon#172 |
Can someone confirm whether that's still an issue with latest v2? |
Describe the bug
I want to change the icon on notifications area, I found that each calling method "app.tray_handle().set_icon(tauri::Icon::Raw(include_bytes!("../icons/2.png").to_vec())).unwrap();" will increase memory.
Reproduction
Continuous calls “set_icon()”
Expected behavior
No memory leaks
Platform and versions
cargo tauri info
Environment
› OS: Mac OS 12.6.0 X64
› Node.js: 16.17.0
› npm: 8.15.0
› pnpm: Not installed!
› yarn: 1.22.19
› rustup: 1.25.1
› rustc: 1.63.0
› cargo: 1.63.0
› Rust toolchain: stable-x86_64-apple-darwin
Packages
› @tauri-apps/cli [NPM]: 1.1.1
› @tauri-apps/api [NPM]: 1.1.0
› tauri [RUST]: 1.1.1,
› tauri-build [RUST]: 1.1.0,
› tao [RUST]: 0.14.0,
› wry [RUST]: 0.21.1,
App
› build-type: bundle
› CSP: unset
› distDir: ../dist
› devPath: http://localhost:1420/
› framework: Vue.js
App directory structure
├─ dist
├─ resources
├─ node_modules
├─ public
├─ runcat.app
├─ src-tauri
├─ .git
├─ .vscode
├─ .idea
└─ src
Stack trace
No response
Additional context
Other languages have similar problems:
getlantern/systray#135
The text was updated successfully, but these errors were encountered: