Hello.
My program can work without Destroy() too.
So why dialog.Destroy() is needed?
Thank you
···
--
-- Jia LU
<http://www.lujia.us>
Registered Linux user #434792
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')])
for p in '001akor@liamg.moc'.split('@')])"
--
\ "Unix is an operating system, OS/2 is half an operating system, |
`\ Windows is a shell, and DOS is a boot partition virus." -- |
_o__) Peter H. Coffin |
If you don't call destroy, the C++ part of the Dialog class will remain in memory forever. Which means you'll be leaking memory. The reason dialogs don't destroy themselves has to do with the fact that usually after a dialog closes you want to have access to some of its attributes and only then have it destroyed.
Jia Lu wrote:
···
Hello.
My program can work without Destroy() too.
So why dialog.Destroy() is needed?
If you don't call destroy, the C++ part of the Dialog class will remain
in memory forever. Which means you'll be leaking memory. The reason
dialogs don't destroy themselves has to do with the fact that usually
after a dialog closes you want to have access to some of its attributes
and only then have it destroyed.
Jia Lu wrote:
> Hello.
> My program can work without Destroy() too.
> So why dialog.Destroy() is needed?
>
> Thank you
>
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org
--
-- Jia LU
<http://www.lujia.us>
Registered Linux user #434792
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')])
for p in '001akor@liamg.moc'.split('@')])"
--
\ "Unix is an operating system, OS/2 is half an operating system, |
`\ Windows is a shell, and DOS is a boot partition virus." -- |
_o__) Peter H. Coffin |
Frames seem to destroy themselves with the default handler of the EVT_CLOSE event. If you override that event though, you need to call event.Skip() to let the default handler have a go or destroy it yourself. Controls and panels are destroyed recursively when their parent windows are destroyed.
Jia Lu wrote:
···
I see.
Only dialog need to use destroy()?
2007/2/3, Eli Golovinsky <gooli@tuzig.com>:
I asked the same question a few days ago.
If you don't call destroy, the C++ part of the Dialog class will remain
in memory forever. Which means you'll be leaking memory. The reason
dialogs don't destroy themselves has to do with the fact that usually
after a dialog closes you want to have access to some of its attributes
and only then have it destroyed.
Jia Lu wrote:
> Hello.
> My program can work without Destroy() too.
> So why dialog.Destroy() is needed?
>
> Thank you
>
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org