diff options
Diffstat (limited to 'source/blender/python/intern/bpy_rna.h')
-rw-r--r-- | source/blender/python/intern/bpy_rna.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/python/intern/bpy_rna.h b/source/blender/python/intern/bpy_rna.h index 3796984ea81..30f6c02115a 100644 --- a/source/blender/python/intern/bpy_rna.h +++ b/source/blender/python/intern/bpy_rna.h @@ -62,6 +62,11 @@ #if defined(USE_PYRNA_INVALIDATE_GC) && defined(USE_PYRNA_INVALIDATE_WEAKREF) #error "Only 1 reference check method at a time!" #endif + +/* only used by operator introspection get_rna(), this is only used for doc gen + * so prefer the leak to the memory bloat for now. */ +// #define PYRNA_FREE_SUPPORT + /* --- end bpy build options --- */ struct ID; @@ -108,7 +113,10 @@ typedef struct { * hold onto the collection iterator to prevent it from freeing allocated data we may use */ PyObject *reference; #endif /* !USE_PYRNA_STRUCT_REFERENCE */ + +#ifdef PYRNA_FREE_SUPPORT int freeptr; /* needed in some cases if ptr.data is created on the fly, free when deallocing */ +#endif /* PYRNA_FREE_SUPPORT */ } BPy_StructRNA; typedef struct { |