<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Aug 24, 2016 at 10:52 AM, Luca Delucchi <span dir="ltr"><<a href="mailto:lucadeluge@gmail.com" target="_blank">lucadeluge@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div id=":1qj" class="">thanks Vaclav, god to know... but I think it could be correct that<br>
function should be called before it will be destroyed<br></div></blockquote><div><br></div><div>__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.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div id=":1qj" class="">
<br>
However we have __del__ function in several gui classes<br>
<br>
<br>
I didn't check all but for example animation/frame.py is identical to<br>
tplot/frame.py<br>
If we decide to rename __del__ function I could do that</div></blockquote></div><br></div><div class="gmail_extra">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__`):</div><div class="gmail_extra"><br>grep -Irn "self.__del__"<br><br></div><div class="gmail_extra">But what might be happening in the current code is that the resources are not released but that requires case-by-case investigation.<br></div></div>