Skip to content

Commit d8c134c

Browse files
committed
Fixing a bug. Due to a race condition, the view of a closing window could get one release too many.
svn path=/branches/v1_0_maint/; revision=8902
1 parent d21caa5 commit d8c134c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/_macosx.m

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3363,7 +3363,6 @@ static void _data_provider_release(void* info, const void* data, size_t size)
33633363
[window setDelegate: view];
33643364
[window makeFirstResponder: view];
33653365
[[window contentView] addSubview: view];
3366-
[view release];
33673366
[window makeKeyAndOrderFront: nil];
33683367

33693368
nwin++;
@@ -4448,6 +4447,10 @@ - (void)dealloc
44484447
gstate = PyGILState_Ensure();
44494448
Py_DECREF(manager);
44504449
PyGILState_Release(gstate);
4450+
/* The reference count of the view that was added as a subview to the
4451+
* content view of this window was increased during the call to addSubview,
4452+
* and is decreased during the call to [super dealloc].
4453+
*/
44514454
[super dealloc];
44524455
}
44534456
@end

0 commit comments

Comments
 (0)