macos: fix memory leak

probably should use an AutoreleasePool as well
This commit is contained in:
Ferdinand Schober
2026-02-06 15:29:24 +01:00
parent 3922b45bd9
commit 708a40d0da

View File

@@ -453,8 +453,10 @@ fn create_event_tap<'a>(
// Returning Drop should stop the event from being processed
// but core fundation still returns the event
cg_ev.set_type(CGEventType::Null);
CallbackResult::Drop
} else {
CallbackResult::Keep
}
CallbackResult::Replace(cg_ev.to_owned())
};
let tap = CGEventTap::new(