Skip to content

Commit a200f79

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=/trunk/matplotlib/; revision=8901
1 parent 07023cc commit a200f79

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
@@ -3755,7 +3755,6 @@ static void _data_provider_release(void* info, const void* data, size_t size)
37553755
[window setDelegate: view];
37563756
[window makeFirstResponder: view];
37573757
[[window contentView] addSubview: view];
3758-
[view release];
37593758
[window makeKeyAndOrderFront: nil];
37603759

37613760
nwin++;
@@ -4854,6 +4853,10 @@ - (void)dealloc
48544853
gstate = PyGILState_Ensure();
48554854
Py_DECREF(manager);
48564855
PyGILState_Release(gstate);
4856+
/* The reference count of the view that was added as a subview to the
4857+
* content view of this window was increased during the call to addSubview,
4858+
* and is decreased during the call to [super dealloc].
4859+
*/
48574860
[super dealloc];
48584861
}
48594862
@end

0 commit comments

Comments
 (0)