[GRASS-dev] [GRASS-SVN] r69248 - grass/trunk/gui/wxpython/tplot

Luca Delucchi lucadeluge at gmail.com
Wed Aug 24 07:52:13 PDT 2016


On 24 August 2016 at 16:40, Vaclav Petras <wenzeslaus at gmail.com> wrote:
>
> On Wed, Aug 24, 2016 at 9:29 AM, <svn_grass at osgeo.org> wrote:
>>
>> +        self.__del__()
>>          self.Destroy()
>
>
> `self.__del__()` just doesn't sound right. A function such as
> release_resources() is recommended in these cases, see e.g.:
>
> http://stackoverflow.com/a/6104568/574907

thanks Vaclav, god to know... but I think it could be correct that
function should be called before it will be destroyed

However we have __del__ function in several gui classes

animation/frame.py:    def __del__(self):
core/gcmd.py:    def __del__(self):
core/render.py:    def __del__(self):
core/ws.py:    def __del__(self):
core/ws.py:    def __del__(self):
gcp/manager.py:    def __del__(self):
gmodeler/model.py:    def __del__(self):
gmodeler/model.py:    def __del__(self):
mapwin/base.py:    def __del__(self):
nviz/mapwindow.py:    def __del__(self):
nviz/wxnviz.py:    def __del__(self):
nviz/wxnviz.py:    def __del__(self):
timeline/frame.py:    def __del__(self):
tplot/frame.py:    def __del__(self):
vdigit/wxdigit.py:    def __del__(self):
vdigit/wxdisplay.py:    def __del__(self):
vnet/vnet_core.py:    def __del__(self):
vnet/vnet_data.py:    def __del__(self):
vnet/vnet_data.py:    def __del__(self):
vnet/vnet_data.py:    def __del__(self):
web_services/dialogs.py:    def __del__(self):
web_services/widgets.py:    def __del__(self):

I didn't check all but for example animation/frame.py is identical to
tplot/frame.py
If we decide to rename __del__ function I could do that

-- 
ciao
Luca

www.lucadelu.org


More information about the grass-dev mailing list