-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
patchs for dbfree problem in python. #37
base: master
Are you sure you want to change the base?
Conversation
we do not need a free, cause it will be done in the lib.
isnt this causing memleaks in other situations? |
i think that the correct fix this for this would be to just specify if the list owning those objects owns the reference or the instance, this is probably the reason why this is failing here. but i would like to have some tests before doing any merge on this. |
Can you paste a example of this dblfree crash? i think i have a better idea to fix this but i need a test to verify that. thanks ! |
@@ -248,7 +248,7 @@ public class SwigWriter : ValabindWriter { | |||
extends += "%%extend %s {\n".printf (name); | |||
|
|||
if (freefun != null && freefun != "") | |||
extends += "\t~%s() {\n\t\t%s(self);\n\t}\n".printf (name, freefun); | |||
extends += "\t~%s() {\n\n\t}\n".printf (name); // we do not need a free, cause it will be done in the lib. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think this should be fixed in RList, SdbList or the APIs or VAPIs, but not this way because that introduces a memory leak. can you provide some examples of scripts that produce this error?
the r2 team is redesigning some APIs to reduce the amount of memory management required by the users. by doing memoization, refcounting and other magic, hopefully all that stuff will make valabind-swig bindings happy again |
we do not need a free, cause it will be done in the lib.
I removed the free item, and did some test in python, no problem detected.