v161 Momory leak on failed gDLL->getPythonIFace()->callFunction

SimCutie

Warlord
Joined
Dec 10, 2005
Messages
197
Substantial memory leak is detected when gDLL->getPythonIFace()->callFunction failed.
This is due to missing entry point of the invoked Python module/function.
So it should at least generate error or recover leaked memory.
This may not bug ( because if it success, no memory leak) but dangerous pitfall.

Once SDK DLL make up a PythonArgs argsList to invoke callFunction(), I should invoke valid successful callFunction() to free the memory. It does not help NOT calling gDLL->getPythonIFace()->callFunction at all. Even if I skip to invoke callFunction(), the memory leak happen. It seems that the used memory is freed in the successful callFunction () only.
PythonArgs .clear() or callFunction(NULL, args...) does not help.
We should have means to free up memory without acually calling "missing" python entry point.
like gDLL->getPythonIFace()->freeArgs(PythonArgs argsList)
 
Top Bottom