[issue1731706] tkinter memory leak problem

2009-02-06 Thread Guilherme Polo

Guilherme Polo ggp...@gmail.com added the comment:

Committed now.

trunk: r69376, r69377
release26-maint: r69378
py3k: r69380
release30-maint: r69381 (hand-merged, as you may notice I forgot to
split the patch in two again in py3k)

--
resolution:  - fixed
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1731706
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1731706] tkinter memory leak problem

2009-02-03 Thread Robert Hancock

Robert Hancock hanc...@sedsystems.ca added the comment:

That's not really a meaningful difference, though.. if the application
uses this code continuously then the conditions will pile up in memory
until it fills up.

--
nosy: +robhancock1 -robhancock

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1731706
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1731706] tkinter memory leak problem

2009-02-03 Thread Guilherme Polo

Guilherme Polo ggp...@gmail.com added the comment:

 That's not really a meaningful difference, though.. if the application
 uses this code continuously then the conditions will pile up in memory
 until it fills up.

I'm not trying to discourage you to do the complete fix (for these two
problems), but this API was made public only in tcl 8.3.1 as can be
seen at 
http://tcl.cvs.sourceforge.net/viewvc/tcl/tcl/ChangeLog?revision=1.226view=markuppathrev=core-8-3-1

Still, the call fix should be backported to python 2.6 as it doesn't
depend on changing supported tcl versions and is also more severe.

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1731706
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1731706] tkinter memory leak problem

2009-02-03 Thread Martin v. Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

 Still, the call fix should be backported to python 2.6 as it doesn't
 depend on changing supported tcl versions and is also more severe.

That sounds like a good approach. If you can split the patch into two,
backporting only one of them - go ahead!

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1731706
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1731706] tkinter memory leak problem

2009-02-02 Thread Martin v. Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

I think the patch is correct. gpolo, what's your opinion?

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1731706
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1731706] tkinter memory leak problem

2009-02-02 Thread Guilherme Polo

Guilherme Polo ggp...@gmail.com added the comment:

Do we still want to say _tkinter.c supports tcl/tk from version 8.2 and
newer ? If yes, then we should add a no-op Tcl_ConditionFinalize when
using tcl older than 8.3, because that was when this function got added.

Besides that, the patch looks fine to me too (except I prefer
Tcl_Condition *cond over Tcl_Condition* cond).

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1731706
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1731706] tkinter memory leak problem

2009-02-02 Thread Martin v. Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

 Do we still want to say _tkinter.c supports tcl/tk from version 8.2 and
 newer ? If yes, then we should add a no-op Tcl_ConditionFinalize when
 using tcl older than 8.3, because that was when this function got added.

Good point. If we want to fix this in 2.6, we *have* to say that. If we
ignore 2.6, and only fix 2.7, we could require a newer Tcl version.

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1731706
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1731706] tkinter memory leak problem

2009-02-02 Thread Guilherme Polo

Guilherme Polo ggp...@gmail.com added the comment:

It is much more important to fix the memory leak anyway, it is possible
to notice real problems using test_tkleak1.py and watching the process
with ps or something else provided by the platform. Besides, not calling
ConditionFinalize doesn't introduce memory leaks, so it is not in par
with issue's title.

But I'm unsure about the existence of systems using Python as the main
language which are also using tkinter and at the same time depend on
tcl/tk 8.2 for some reason. So, to me, it would seem fine to start
requiring tcl/tk 8.3 (or even newer!) starting with 2.7 and 3.1

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1731706
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1731706] tkinter memory leak problem

2009-02-02 Thread Martin v. Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

 Besides, not calling ConditionFinalize doesn't introduce memory leaks

Are you sure about this?  On Unix, TclpFinalizeCondition does

pthread_cond_destroy(pcondPtr);
ckfree((char *) pcondPtr);

both of which release memory (IIUC). Likewise for Windows, except
that it calls DeleteCriticalSection.

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1731706
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1731706] tkinter memory leak problem

2009-02-02 Thread Guilherme Polo

Guilherme Polo ggp...@gmail.com added the comment:

 Besides, not calling ConditionFinalize doesn't introduce memory leaks

 Are you sure about this?  On Unix, TclpFinalizeCondition does

pthread_cond_destroy(pcondPtr);
ckfree((char *) pcondPtr);

 both of which release memory (IIUC). Likewise for Windows, except
 that it calls DeleteCriticalSection.


I think I meant something more like it doesn't result in memory
definitely lost because tcl will free these conditions when tcl
finishes, but it does introduce memory leak in the sense that the
memory isn't freed right after it is not longer used.

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1731706
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1731706] tkinter memory leak problem

2008-12-16 Thread Guilherme Polo

Guilherme Polo ggp...@gmail.com added the comment:

Sample attached for demonstrating the leak by missing a call to
Tkapp_CallDeallocArgs.

--
nosy: +gpolo
Added file: http://bugs.python.org/file12373/test_tkleak1.py

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1731706
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1731706] tkinter memory leak problem

2008-01-06 Thread Christian Heimes

Changes by Christian Heimes:


--
versions: +Python 2.6

_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1731706
_
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com