Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGermano Cavalcante <germano.costa@ig.com.br>2021-02-24 17:57:29 +0300
committerGermano Cavalcante <germano.costa@ig.com.br>2021-02-24 17:57:29 +0300
commit7972785d7b90771f50534fe3e1101d8adb615fa3 (patch)
tree0880e1531a3809d6c1ec26eda638c22659b4fe73 /source/blender/python/BPY_extern.h
parent6b6469a2e552e1454cb09987d931cc5e72a99fdf (diff)
PyAPI: Fix memory leak of parameters used for python 'draw_callbacks'
When closing the blender, while the callbacks are removed, the reference count of the object used as `customdata` is not decremented. This commit adds two functions that correctly release the python `draw_callbacks` before releasing all `draw_callbacks`. Differential Revision: https://developer.blender.org/D10478
Diffstat (limited to 'source/blender/python/BPY_extern.h')
-rw-r--r--source/blender/python/BPY_extern.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/python/BPY_extern.h b/source/blender/python/BPY_extern.h
index 366d801a888..90f54c50a6d 100644
--- a/source/blender/python/BPY_extern.h
+++ b/source/blender/python/BPY_extern.h
@@ -21,6 +21,7 @@
#pragma once
struct AnimationEvalContext;
+struct ARegionType;
struct ChannelDriver; /* DNA_anim_types.h */
struct ID; /* DNA_ID.h */
struct ListBase; /* DNA_listBase.h */
@@ -33,6 +34,7 @@ struct bConstraintTarget; /* DNA_constraint_types.h*/
struct bContext;
struct bContextDataResult;
struct bPythonConstraint; /* DNA_constraint_types.h */
+struct wmWindowManager;
#include "BLI_utildefines.h"
@@ -100,6 +102,10 @@ void BPY_id_release(struct ID *id);
bool BPY_string_is_keyword(const char *str);
+/* bpy_rna_callback.c */
+void BPY_callback_screen_free(struct ARegionType *art);
+void BPY_callback_wm_free(struct wmWindowManager *wm);
+
/* I18n for addons */
#ifdef WITH_INTERNATIONAL
const char *BPY_app_translations_py_pgettext(const char *msgctxt, const char *msgid);