From 5fb8d11203869acee84c82537d010cc40153684a Mon Sep 17 00:00:00 2001 From: sgschantz Date: Mon, 7 Oct 2024 11:03:08 +0700 Subject: [PATCH] feat(mac): add call to km_core_keyboard_key_list_dispose memory leak of key list without disposing --- .../KeymanEngine4Mac/CoreWrapper/CoreWrapper.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mac/KeymanEngine4Mac/KeymanEngine4Mac/CoreWrapper/CoreWrapper.m b/mac/KeymanEngine4Mac/KeymanEngine4Mac/CoreWrapper/CoreWrapper.m index ea5bb8c2228..c1cd9b81f85 100644 --- a/mac/KeymanEngine4Mac/KeymanEngine4Mac/CoreWrapper/CoreWrapper.m +++ b/mac/KeymanEngine4Mac/KeymanEngine4Mac/CoreWrapper/CoreWrapper.m @@ -91,6 +91,8 @@ -(NSArray*)getKeyArray { } } + km_core_keyboard_key_list_dispose(keyList); + os_log_debug([KMELogs coreLog], "getKeyList returning %lu keys", (unsigned long)keyArray.count); return keyArray; @@ -103,7 +105,7 @@ -(void) dealloc{ if (self.coreKeyboard) { km_core_keyboard_dispose(self.coreKeyboard); } - os_log_debug([KMELogs coreLog], "dealloc called."); + os_log_debug([KMELogs coreLog], "CoreWrapper dealloc called"); } -(void)loadKeyboardUsingCore:(NSString*) path {