Closed GoogleCodeExporter closed 9 years ago
Original comment by yarmond
on 27 May 2011 at 9:44
I tested the getEnthalpy_RT() and getPartialMolarEnthalpies() routines in a c++
script and didn't produce a memory leak.
This might be happening where python interfaces with the function call.
Original comment by rocky3...@gmail.com
on 7 Jul 2011 at 11:40
I believe I found the fix for this issue.
After commenting out line 201 in ctthermo_methods.cpp located in the source
distribution under cantera/Cantera/python/src, and reinstalling, the attached
python script no longer leaked my computer's memory.
The commented line was PyINCREF(x);.
I cannot immediately see increasing the reference count of this object serving
any purpose since it is returned to python. Since its returned with a
reference count of 2, python doesn't garbage collect it, and hence, leaves
copies of the array in memory.
Original comment by rocky3...@gmail.com
on 12 Jul 2011 at 11:16
Fixed this and a similar issue in "phase_getarray" in r1327.
Original comment by yarmond
on 23 Mar 2012 at 10:18
Original issue reported on code.google.com by
rocky3...@gmail.com
on 18 Apr 2011 at 10:05Attachments: