From c87de84fab755f3ce881bac1a134c53950c23c76 Mon Sep 17 00:00:00 2001 From: Casper Rogild Storm Date: Thu, 26 Sep 2024 09:45:52 +0200 Subject: [PATCH] Fix memory leak in rustk-dark-light crate --- Cargo.lock | 8 +++++--- Cargo.toml | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a389ea92..0068e7a7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1165,14 +1165,16 @@ dependencies = [ [[package]] name = "dark-light" version = "1.1.1" -source = "git+https://github.com/frewsxcv/rust-dark-light?rev=77ae4349f11a556cef9c683803a832f171253479#77ae4349f11a556cef9c683803a832f171253479" +source = "git+https://github.com/casperstorm/rust-dark-light?rev=10176d160bc3922ed0511ab0e3949b4b6eaf4d50#10176d160bc3922ed0511ab0e3949b4b6eaf4d50" dependencies = [ "anyhow", "ashpd 0.7.0", "dconf_rs", "detect-desktop-environment 1.1.0", "futures", - "objc", + "objc2", + "objc2-app-kit", + "objc2-foundation", "rust-ini 0.20.0", "web-sys", "winreg 0.52.0", @@ -2055,7 +2057,7 @@ version = "0.1.0" dependencies = [ "bytesize", "chrono", - "dark-light 1.1.1 (git+https://github.com/frewsxcv/rust-dark-light?rev=77ae4349f11a556cef9c683803a832f171253479)", + "dark-light 1.1.1 (git+https://github.com/casperstorm/rust-dark-light?rev=10176d160bc3922ed0511ab0e3949b4b6eaf4d50)", "data", "embed-resource", "fern", diff --git a/Cargo.toml b/Cargo.toml index a7381623..d310206e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -41,8 +41,8 @@ rodio = "0.19.0" strum = { version = "0.26.3", features = ["derive"] } tokio-stream = {version = "0.1.16", features = ["fs"] } -# Using commit hash for dark-light as latest release didn't have async notify. -dark-light = { git = "https://github.com/frewsxcv/rust-dark-light", rev = "77ae4349f11a556cef9c683803a832f171253479" } +# Using a fork from @madsmtm since he has a outstanding PR to the original repo which fixes a memory leak on macOS. +dark-light = { git = "https://github.com/casperstorm/rust-dark-light", rev = "10176d160bc3922ed0511ab0e3949b4b6eaf4d50" } [dependencies.uuid] version = "1.0"