mirror of
https://git.telodendria.io/Telodendria/Cytoplasm.git
synced 2024-11-21 19:50:47 +03:00
Fix memory leak in some generated code.
This commit is contained in:
parent
4e58b41049
commit
49acb75498
1 changed files with 4 additions and 0 deletions
|
@ -1009,6 +1009,10 @@ Main(Array * args)
|
||||||
StreamPrintf(implFile, " for (i = 0; i < ArraySize(val->%s); i++)\n", key);
|
StreamPrintf(implFile, " for (i = 0; i < ArraySize(val->%s); i++)\n", key);
|
||||||
StreamPrintf(implFile, " {\n");
|
StreamPrintf(implFile, " {\n");
|
||||||
StreamPrintf(implFile, " %sFree(ArrayGet(val->%s, i));\n", (!isEnum && !isPrimitive) ? fieldType : "", key);
|
StreamPrintf(implFile, " %sFree(ArrayGet(val->%s, i));\n", (!isEnum && !isPrimitive) ? fieldType : "", key);
|
||||||
|
if (!isEnum && !isPrimitive)
|
||||||
|
{
|
||||||
|
StreamPrintf(implFile, " Free(ArrayGet(val->%s, i));\n", key);
|
||||||
|
}
|
||||||
StreamPrintf(implFile, " }\n");
|
StreamPrintf(implFile, " }\n");
|
||||||
StreamPrintf(implFile, " ArrayFree(val->%s);\n", key);
|
StreamPrintf(implFile, " ArrayFree(val->%s);\n", key);
|
||||||
StreamPrintf(implFile, " }\n");
|
StreamPrintf(implFile, " }\n");
|
||||||
|
|
Loading…
Reference in a new issue