]> git.saurik.com Git - wxWidgets.git/commit - wxPython/src/msw/windows.cpp
A little black magic... When the C++ object (for a window or
authorRobin Dunn <robin@alldunn.com>
Tue, 9 Apr 2002 22:01:45 +0000 (22:01 +0000)
committerRobin Dunn <robin@alldunn.com>
Tue, 9 Apr 2002 22:01:45 +0000 (22:01 +0000)
commit4acff284f9516e2a4f0fcfa7bcfa3f497b8005cc
tree4b2d6555ca240daf27d565e77f82d5324c60cb70
parent31fa82942c929bbef9270a52fc26e0af627e19eb
A little black magic...  When the C++ object (for a window or
whatever) is deleted there is no way to force the Python shadow object
to also be destroyed and clean up all references to it.  This leads to
crashes if the shadow object tries to call a method with the old C++
pointer...  The black magic I've done is to replace the __class__ in the
Python instanc object with a class that raises an exception whenever a
method call is attempted.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15059 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
18 files changed:
wxPython/contrib/ogl/ogl.cpp
wxPython/contrib/ogl/ogl.i
wxPython/contrib/ogl/oglbasic.cpp
wxPython/contrib/ogl/oglbasic.i
wxPython/src/_extras.py
wxPython/src/export.h
wxPython/src/helpers.cpp
wxPython/src/helpers.h
wxPython/src/msw/gdi.py
wxPython/src/msw/sizers.cpp
wxPython/src/msw/utils.cpp
wxPython/src/msw/windows.cpp
wxPython/src/msw/wx.cpp
wxPython/src/msw/wx.py
wxPython/src/sizers.i
wxPython/src/utils.i
wxPython/src/windows.i
wxPython/src/wx.i