<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Thank you. That was very informative and helpful.<div class=""><br class=""><div class="">
<div dir="auto" style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">---</div><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">Israel Brewster<br class="">Software Engineer<br class="">Alaska Volcano Observatory <br class="">Geophysical Institute - UAF <br class="">2156 Koyukuk Drive <br class="">Fairbanks AK 99775-7320</div><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">Work: 907-474-5172<br class="">cell:  907-328-9145</div></div>
</div>
<div style=""><br class=""><blockquote type="cite" class=""><div class="">On Feb 6, 2020, at 12:00 PM, John Ehresman <<a href="mailto:jpe@wingware.com" class="">jpe@wingware.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">On 2/7/20 9:41 AM, Israel Brewster wrote:<br class=""><blockquote type="cite" class="">On Feb 6, 2020, at 11:28 AM, John Ehresman <<a href="mailto:jpe@wingware.com" class="">jpe@wingware.com</a> <<a href="mailto:jpe@wingware.com" class="">mailto:jpe@wingware.com</a>>> wrote:<br class=""><blockquote type="cite" class=""><br class="">In general, del in Python is very different than delete in C++.  I'll leave it to others to explain. <br class=""></blockquote>In general, sure. In general, python memory management is very different than C/C++ memory management, so it stands to reason that del/delete would, in general, be different as well. I’m not asking about the general case, I’m asking about the Qt case, and the things that Qt does when you delete a Qt object. I’m not asking for a low-level view of memory management. I’m asking if the *behavior*, as far as *Qt* objects is concerned, is the same.<br class=""></blockquote><br class="">With PyQt or PySide, C++ delete is called when the last Python reference is dropped to an object created from Python (there are other conditions as well).  Python del will drop a reference to the object so C++ delete will be invoked if there are no other references to the object (and other conditions are met).  In my experience, relying on this is a mistake because there are often other references in all but the simplest examples.<br class=""><blockquote type="cite" class=""><blockquote type="cite" class="">or PySide may expose a function to do a C++ delete -- it's probably shiboken.delete().<br class=""></blockquote>That sounds like what I’m looking for, assuming that a python del doesn’t do the same thing.<br class=""></blockquote><br class="">If you want to be sure C++ delete is called, I recommend that you use the function to call it.<br class=""><br class="">John<br class=""></div></div></blockquote></div><br class=""></div></body></html>