File tree Expand file tree Collapse file tree 1 file changed +2
-13
lines changed
Expand file tree Collapse file tree 1 file changed +2
-13
lines changed Original file line number Diff line number Diff line change @@ -193,7 +193,6 @@ @interface Window : NSWindow
193193- (Window*)initWithContentRect : (NSRect )rect styleMask : (unsigned int )mask backing : (NSBackingStoreType )bufferingType defer : (BOOL )deferCreation withManager : (PyObject*)theManager ;
194194- (NSRect )constrainFrameRect : (NSRect )rect toScreen : (NSScreen *)screen ;
195195- (BOOL )closeButtonPressed ;
196- - (void )dealloc ;
197196@end
198197
199198@interface View : NSView <NSWindowDelegate >
@@ -1239,19 +1238,9 @@ - (void)close
12391238 /* This is needed for show(), which should exit from [NSApp run]
12401239 * after all windows are closed.
12411240 */
1242- }
1243-
1244- - (void )dealloc
1245- {
1246- PyGILState_STATE gstate;
1247- gstate = PyGILState_Ensure ();
1241+ // For each new window, we have incremented the manager reference, so
1242+ // we need to bring that down during close and not just dealloc.
12481243 Py_DECREF (manager);
1249- PyGILState_Release (gstate);
1250- /* The reference count of the view that was added as a subview to the
1251- * content view of this window was increased during the call to addSubview,
1252- * and is decreased during the call to [super dealloc].
1253- */
1254- [super dealloc ];
12551244}
12561245@end
12571246
You can’t perform that action at this time.
0 commit comments