Details
-
Bug
-
Resolution: Duplicate
-
Not Evaluated
-
None
-
1.2.x
-
None
Description
The attached script crashes on program exit, at least on pydebug builds on Windows (on release builds it will probably read/write memory after it's freed, which may or may not cause a crash). What happens is that after the test function has completed, the only reference to the w object is the one held by the function connected to destroyed. On shutdown, the C++ SignalManagerPrivate is deleted and deletes all the global receivers. This releases the ref to on_destroy function, which in turn releases the ref to the w object. The release of the last ref to the w object triggers the C++ object to be deleted, which in turn emits destroy and a call to on_destroy which then tries to access the already dealloced w object.