explicitly delete our c++ window on quit
BUG=skia: TBR= NOTRY=True Review URL: https://codereview.chromium.org/633923002
This commit is contained in:
parent
ebfce4149e
commit
d3ce6b44e5
@ -18,6 +18,7 @@
|
||||
}
|
||||
|
||||
- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender {
|
||||
[fView freeNativeWind];
|
||||
application_term();
|
||||
return NSTerminateNow;
|
||||
}
|
||||
|
@ -49,4 +49,7 @@ class SkEvent;
|
||||
- (bool)attach:(SkOSWindow::SkBackEndTypes)attachType withMSAASampleCount:(int) sampleCount andGetInfo:(SkOSWindow::AttachmentInfo*) info;
|
||||
- (void)detach;
|
||||
- (void)present;
|
||||
|
||||
- (void)freeNativeWind;
|
||||
|
||||
@end
|
||||
|
@ -118,12 +118,17 @@ SK_COMPILE_ASSERT(SK_SUPPORT_GPU, not_implemented_for_non_gpu_build);
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
delete fWind;
|
||||
[self freeNativeWind];
|
||||
self.fGLContext = nil;
|
||||
self.fTitle = nil;
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (void)freeNativeWind {
|
||||
delete fWind;
|
||||
fWind = nil;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
- (void)drawSkia {
|
||||
|
@ -18,11 +18,6 @@
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
delete fWind;
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (void)swipeWithEvent:(NSEvent *)event {
|
||||
CGFloat x = [event deltaX];
|
||||
if (x < 0)
|
||||
|
Loading…
Reference in New Issue
Block a user