On Wed, Aug 24, 2016 at 10:52 AM, Luca Delucchi <[email protected]> wrote:
> thanks Vaclav, god to know... but I think it could be correct that > function should be called before it will be destroyed > __del__ in Python is complicated. I'm not sure what is the correct way to use it. I only know that if you want to release resource, you should call close(), free(), release(), Destroy() or whatever is the name. One doesn't call __del__() explicitly on the object itself. > > However we have __del__ function in several gui classes > > > 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 > No, each case might be different. Although some revision might be useful, there is no other case where object would call __del__ on itself (`self.__del__`): grep -Irn "self.__del__" But what might be happening in the current code is that the resources are not released but that requires case-by-case investigation.
_______________________________________________ grass-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/grass-dev
