[Python-bugs-list] [ python-Bugs-745055 ] Memory leak in _tkinter.c/Tkapp_SplitList()

SourceForge.net noreply@sourceforge.net
Thu, 29 May 2003 11:43:36 -0700


Bugs item #745055, was opened at 2003-05-28 13:55
Message generated for change (Comment added) made by bwarsaw
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=745055&group_id=5470

Category: Tkinter
Group: Python 2.2.2
Status: Open
Resolution: Fixed
Priority: 5
Submitted By: Toni Leppäkorpi (leppako)
>Assigned to: Neal Norwitz (nnorwitz)
Summary: Memory leak in _tkinter.c/Tkapp_SplitList()

Initial Comment:
Splitlist() function leaks any string given to it as a
parameter.
This code should reproduce the problem:

import Tkinter
b = Tkinter.Button(text='Leak',
    command=lambda:b.tk.splitlist('1 2 {3 4} 5 '*10000))
b.pack()
b.mainloop()


----------------------------------------------------------------------

>Comment By: Barry A. Warsaw (bwarsaw)
Date: 2003-05-29 14:43

Message:
Logged In: YES 
user_id=12800

Neal, go ahead and back port it.  Tim's checking new
features into 2.2.3 on BDFL directive, so this one can't do
much more harm <wink>.

I still don't think we need another release candidate. 
There's always 2.2.4 next week. :)

----------------------------------------------------------------------

Comment By: Neal Norwitz (nnorwitz)
Date: 2003-05-28 20:18

Message:
Logged In: YES 
user_id=33168

Checked in as Modules/_tkinter.c 1.160.

Assigned to Barry to see if he wants it backported to 2.2.3.
 Otherwise, this should be backported to 2.2.4.

----------------------------------------------------------------------

Comment By: Toni Leppäkorpi (leppako)
Date: 2003-05-28 17:47

Message:
Logged In: YES 
user_id=788774

Good work nnorwitz. Problem solved.

----------------------------------------------------------------------

Comment By: Neal Norwitz (nnorwitz)
Date: 2003-05-28 14:34

Message:
Logged In: YES 
user_id=33168

Funny, I thought I had posted a patch about this.  Could you
test the attached patch which is against the CVS version? 
It shouldn't be hard to apply to 2.2.2/2.2.3 either.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=745055&group_id=5470