mirror of
https://github.com/wailsapp/wails.git
synced 2026-03-15 07:05:50 +01:00
[mac] Fix memory leak with menu item callback data
This commit is contained in:
parent
2fbc63b458
commit
e04db8775f
1 changed files with 5 additions and 1 deletions
|
|
@ -85,7 +85,11 @@ void DeleteMenu(Menu *menu) {
|
|||
menu->processedMenu = NULL;
|
||||
}
|
||||
|
||||
// Release the vector memory
|
||||
// Release the callback data memory + vector
|
||||
int i; MenuItemCallbackData* callbackData;
|
||||
vec_foreach(&menu->callbackDataCache, callbackData, i) {
|
||||
free(callbackData);
|
||||
}
|
||||
vec_deinit(&menu->callbackDataCache);
|
||||
|
||||
// Free nsmenu if we have it
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue