]> git.saurik.com Git - wxWidgets.git/commitdiff
A little black magic... When the C++ object (for a window or
authorRobin Dunn <robin@alldunn.com>
Tue, 9 Apr 2002 22:14:34 +0000 (22:14 +0000)
committerRobin Dunn <robin@alldunn.com>
Tue, 9 Apr 2002 22:14:34 +0000 (22:14 +0000)
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 instance 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@15060 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/CHANGES.txt

index 99aa9001cb7e72364b5a6cdbe7458f23132a0dd2..24dcc93bb7e1449d53fe3fc7f9e5b56593c52695 100644 (file)
@@ -75,6 +75,14 @@ Added wxIconBundle and wxTopLevelWindow.SetIcons.
 
 Added wxLocale and wxEncodingConverter.
 
+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 instance object with a class that raises an exception whenever
+a method call (or other attribute access) is attempted.  This works
+for any class that is OOR aware.