Hi, I installed PyOpenGL-188.8.131.52.win32-py2.2.exe.
I hunted a memleak in my app for some time and I
finally fixed it: my app lost mem everytime it called
glVertex2f and glVertex2sv are working fine though.
Logged In: YES
I'm guessing this is the responsible code from
interface/simple_typemaps.inc (would be nice to have a
test-case BTW to be sure it's still a problem):
$1= ($1_type)(PyInt_AsLong( PyNumber_Int($input) ));
Why is PyNumber_Int used, PyInt_AsLong attempts to do the
conversion anyway, and PyNumber_Int creates a _new_
reference (hence the leak)!
Rene, could you check that I haven't missed something C-ish
(or maybe some sort of weird Python-version problem?), and
if not, simply eliminate the PyNumber_Int call?
if (PyInt_Check($input) || PyLong_Check($input))
$1= ($1_type)(PyInt_AsLong( $input ));
PyOpenGL builds with the given change, but again, there
isn't a test for the condition to confirm that it actually
fixes the problem.
Ah well, I'll assume I got it right (I accidentally ;)
checked the change in), as it seems to work and be logical.
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.