@@ -245,11 +245,13 @@ - (void)dealloc
245
245
ASLogDebug (@" " );
246
246
247
247
[decoratedWindow release ]; decoratedWindow = nil ;
248
+ [fullScreenWindow release ]; fullScreenWindow = nil ;
248
249
[windowAutosaveKey release ]; windowAutosaveKey = nil ;
249
250
[vimView release ]; vimView = nil ;
250
251
[toolbar release ]; toolbar = nil ;
251
252
// in case processAfterWindowPresentedQueue wasn't called
252
253
[afterWindowPresentedQueue release ]; afterWindowPresentedQueue = nil ;
254
+ [lastSetTitle release ]; lastSetTitle = nil ;
253
255
254
256
[super dealloc ];
255
257
}
@@ -461,8 +463,9 @@ - (void)zoomWithRows:(int)rows columns:(int)cols state:(int)state
461
463
- (void )setTitle : (NSString *)title
462
464
{
463
465
// Save the original title, if we haven't already.
466
+ [title retain ]; // retain the title first before release lastSetTitle, since you can call setTitle on lastSetTitle itself.
464
467
[lastSetTitle release ];
465
- lastSetTitle = [ title retain ] ;
468
+ lastSetTitle = title;
466
469
467
470
// While in live resize the window title displays the dimensions of the
468
471
// window so don't clobber this with the new title. We have already set
@@ -934,10 +937,6 @@ - (void)enterFullScreen:(int)fuoptions backgroundColor:(NSColor *)back
934
937
// Enter custom full-screen mode.
935
938
ASLogInfo (@" Enter custom full-screen" );
936
939
937
- // fullScreenWindow could be non-nil here if this is called multiple
938
- // times during startup.
939
- [fullScreenWindow release ];
940
-
941
940
NSColor *fullscreenBg = back;
942
941
943
942
// See setDefaultColorsBackground: for why set a transparent
@@ -946,6 +945,10 @@ - (void)enterFullScreen:(int)fuoptions backgroundColor:(NSColor *)back
946
945
fullscreenBg = [fullscreenBg colorWithAlphaComponent: 0.001 ];
947
946
}
948
947
948
+ // fullScreenWindow could be non-nil here if this is called multiple
949
+ // times during startup.
950
+ [fullScreenWindow release ];
951
+
949
952
fullScreenWindow = [[MMFullScreenWindow alloc ]
950
953
initWithWindow: decoratedWindow view: vimView backgroundColor: fullscreenBg];
951
954
[fullScreenWindow setOptions: fuoptions];
0 commit comments