Please, clarify this problem.
When we create wxDialog object and then do ShowModal,
why then we must do Destroy manually. Yes, after exiting
from ShowModal the window is not destroyed, but hidden.
But if we do this:
dlg = wx.Dialog(...)
dlg.ShowModal()
dlg = None
or simpler
def doSomeDlg():
dlg = wx.Dialog(...)
return dlg.ShowModal()
is this correct?
Please, describe common patterns when using wxDialog
with ShowModal and Show.
What about gc? Is something left unfreed after gc is
done freeing unused memory. Has wxPython those memory leakage
proplems of languages c and c++?
If that is true, it is pity...
And must somehow been repaired, imho...
bye
kvp
···
__________
www.newmail.ru -- п²п╬п╡п╟я▐ п÷п╬я┤я┌п╟ п╢п╩я▐ п╫п╬п╡п╬пЁп╬ п©п╬п╨п╬п╩п╣п╫п╦я▐.
I would sugest something more less like this:
def doSomeDlg():
dlg = wx.Dialog(...)
ok = wx.false
try:
if dlg.ShowModal() == wx.ID_OK:
ok = wx.true
finally:
dlg.Destroy()
return ok
···
Dnia Wed, Aug 27, 2003 at 09:53:36AM +0400, kvp@hotmail.ru napisał:
Please, clarify this problem.
When we create wxDialog object and then do ShowModal,
why then we must do Destroy manually. Yes, after exiting
from ShowModal the window is not destroyed, but hidden.
But if we do this:
dlg = wx.Dialog(...)
dlg.ShowModal()
dlg = None
or simpler
def doSomeDlg():
dlg = wx.Dialog(...)
return dlg.ShowModal()
is this correct?
Please, describe common patterns when using wxDialog
with ShowModal and Show.
What about gc? Is something left unfreed after gc is
done freeing unused memory. Has wxPython those memory leakage
proplems of languages c and c++?
If that is true, it is pity...
And must somehow been repaired, imho...
--
Przemyslaw G. Gawronski
Informatyk w Sekcji Systemu, Telemetria
TNS OBOP
ul.Dereniowa 11
02-776 Warszawa
e przemyslaw.gawronski@tns-global.pl
t +48 22 648 20 44 (-46)
f +48 22 644 9947
http://www.tns-global.pl