Hi!

If we use PySequence_GetItem to get element, we need to unref that item 
explicitly.  This is different from PyList_GetItem, PyTuple_GetItem.
I attach the example to trigger this leakage and patch made against 
cvs version.

#! /usr/bin/env python

from gtk import *

win = GtkWindow()
list = [0]*5

while 1:
        for i in range(5):
                list[i] = `i`*20000
        clist = GtkCList(5, list)
        win.add(clist) # sink
        clist.destroy()

diff.gz

Reply via email to