Commit c170fab4 authored by Brendan Shanks's avatar Brendan Shanks

macOS: Always call [super dealloc] in GVWindowController dealloc

Apparently added because of crashes on 10.7 and up, I haven't seen any
on 10.13. Crashing here indicates a problem elsewhere anyway.
parent c47149d7
...@@ -116,14 +116,8 @@ ...@@ -116,14 +116,8 @@
} }
- (void)dealloc - (void)dealloc
{ {
char darwinStr[256];
size_t size = sizeof(darwinStr);
[[NSNotificationCenter defaultCenter] removeObserver:self name:@"GVGraphDocumentDidChange" object:[self document]]; [[NSNotificationCenter defaultCenter] removeObserver:self name:@"GVGraphDocumentDidChange" object:[self document]];
sysctlbyname("kern.osrelease", darwinStr, &size, NULL, 0); [super dealloc];
NSString *darwinVer = [NSString stringWithCString:darwinStr encoding:NSASCIIStringEncoding];
NSString *baseVer = @"11";
if ([darwinVer compare:baseVer] < 0)
[super dealloc];
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment