Nodes: Use destructor callbacks for bNodeSocketType and bNodeType

Reviewers: brecht

Differential Revision: https://developer.blender.org/D6963
This commit is contained in:
2020-02-28 13:28:16 +01:00
parent da1140f75e
commit c60be37f3e
5 changed files with 20 additions and 10 deletions

View File

@@ -403,6 +403,7 @@ static bNodeSocketType *make_standard_socket_type(int type, int subtype)
StructRNA *srna;
stype = MEM_callocN(sizeof(bNodeSocketType), "node socket C type");
stype->free_self = (void (*)(bNodeSocketType * stype)) MEM_freeN;
BLI_strncpy(stype->idname, socket_idname, sizeof(stype->idname));
/* set the RNA type
@@ -441,6 +442,7 @@ static bNodeSocketType *make_socket_type_virtual(void)
StructRNA *srna;
stype = MEM_callocN(sizeof(bNodeSocketType), "node socket C type");
stype->free_self = (void (*)(bNodeSocketType * stype)) MEM_freeN;
BLI_strncpy(stype->idname, socket_idname, sizeof(stype->idname));
/* set the RNA type