Fix T93523: Memory leak in Menu Search
Fixes a memory leak introduced by D13225. Caused by not freeing the hash-map in some cases. Differential Revision: https://developer.blender.org/D13432
This commit is contained in:
parent
be2213472f
commit
3753a0b72b
Notes:
blender-bot
2023-02-14 11:01:33 +01:00
Referenced by issue #93523, Not freed memory blocks in Menu Search
|
@ -45,6 +45,7 @@
|
|||
#include "DNA_view3d_types.h"
|
||||
#include "DNA_workspace_types.h"
|
||||
|
||||
#include "BLI_ghash.h"
|
||||
#include "BLI_listbase.h"
|
||||
#include "BLI_math_vector.h"
|
||||
#include "BLI_mempool.h"
|
||||
|
@ -671,6 +672,11 @@ void BKE_area_region_free(SpaceType *st, ARegion *region)
|
|||
region_free_gizmomap_callback(region->gizmo_map);
|
||||
}
|
||||
|
||||
if (region->runtime.block_name_map != NULL) {
|
||||
BLI_ghash_free(region->runtime.block_name_map, NULL, NULL);
|
||||
region->runtime.block_name_map = NULL;
|
||||
}
|
||||
|
||||
BLI_freelistN(®ion->ui_lists);
|
||||
BLI_freelistN(®ion->ui_previews);
|
||||
BLI_freelistN(®ion->panels_category);
|
||||
|
|
Loading…
Reference in New Issue