#121 Memory leak in glInterleavedArrays, glVertexPointer, etc

v2.0.1
open
GL (74)
7
2004-11-16
2004-11-16
Jeff Epler
No

The attached simple program shows that the refcount of
the single string '' increases each time it is the
argument to glInterleavedArrays or glVertexPointer. In
the actual program, the behavior is instead a memory
leak, as the parameter results each time from the
method array.array.tostring().

Discussion

  • Jeff Epler

    Jeff Epler - 2004-11-16

    Demonstrates the refcounting error

     
  • Mike C. Fletcher

    • priority: 5 --> 7
    • assigned_to: nobody --> mcfletch
     
  • Nobody/Anonymous

    Logged In: NO

    I think this problem is caused by the implementation of
    _PyObject_AsPointer, in interface_util.c.
    There should be a Py_DECREF(x) before returning from this
    function since the PyObject_Str() call is returning a new
    reference (which is currently never freed)

    -- Tom Beaumont (tombeaumont at yahoo dot com)

     
  • Tom Beaumont

    Tom Beaumont - 2005-03-02

    Logged In: YES
    user_id=1231187

    I just uploaded a patch which seems to fix this bug (1155301)

     

Log in to post a comment.