[PyQt] PyQt. How to shoot yourself in the foot.

Kovid Goyal kovid at kovidgoyal.net
Sun Aug 24 14:03:05 BST 2014


sip.isdeleted() is your friend 

There are some situations where you simply cannot know if a python
reference points to a C++ object that was deleted by its C++ parent.
So if you see The RuntimeError about the C++ instance being deleted,
simply protect that region of code with sip.isdeleted()

Kovid.

On Sat, Aug 23, 2014 at 10:40:51PM +0300, Andrei Kopats wrote:
> Hi
> 
> I just published an article about memory management in PyQt. I think it
> could be interesting for somebody in this list.
> http://enki-editor.org/2014/08/23/Pyqt_mem_mgmt.html
> I'll be thankful for comments and corrections.
> 
> Andrei Kopats
> 
> 
> !DSPAM:3,53f8ee7318454101310386!

> _______________________________________________
> PyQt mailing list    PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
> 
> !DSPAM:3,53f8ee7318454101310386!


-- 
_____________________________________

Dr. Kovid Goyal 
http://www.kovidgoyal.net
http://calibre-ebook.com
_____________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20140824/769b7f0e/attachment.sig>


More information about the PyQt mailing list