Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cherry-wb
Copy link

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.

we do not need a free, cause it will be done in the lib.
@radare
Copy link
Owner

radare commented Jun 7, 2016

isnt this causing memleaks in other situations?

@radare
Copy link
Owner

radare commented Jun 7, 2016

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.

@radare
Copy link
Owner

radare commented Jun 29, 2016

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 !

radare referenced this pull request in radareorg/radare2 Jun 29, 2016
@@ -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.
Copy link
Owner

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?

@radare
Copy link
Owner

radare commented Jan 23, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants