Closed mag-sruehl closed 4 years ago
PR #212 will fix this issue.
I have been working on fixing the issues #41, #129, #157. These are all SIP related. These are fixed in SIP 4.19.21. So have you tried this with SIP 4.19.21?
Hi Matthijs! SIP was my main suspect for this memory leak, so build and test with 4.19.21 was my first move. But that did not fix it. Instead, the problem is in the sip declaration of Tree.getChain. There is a Chain instance new'ed in getChain which is returned by that function. Thus I assume the ownership of that object has to be transferred to python by declaring getChain as a "factory". That is what I propose in PR #212.
Disclaimer: All my python-sip knowlede is base on random findings form a one hour google session - I am clearly no expert on that topic.
Please close this issue
This code will consume will grow the memory usage on my pc from 107 mb at the first raw_input to 677 mb in the end:
valgrind output (only the very last):
I used orocos_kinematics_dynamics 1.4.0 and current master. As this is similar to #157, I have built it with with the fixed 4.19-maint (v4.19.21 ??? January 2020) sip version.
Further, I suspect the problem is the new kinfam.sip:271
But as I have no knowledge about sip, I am not sure about that. I will look further into it since I am desperate for a fix. Any help would be very welcome.