Closed MeijisIrlnd closed 3 months ago
The objective c code looks correct to me. The lifetime thing I would have to debug but the code looks ok if it stops your crashing i'm sure its good
only thing is this commit also has the windows commit in it (145c87a) - is that intentional? I thought I had merged that to next so I think it's a rebasing problem more than anything else. This PR looks like it should just be b416128
yeah, I think I must have done something horrible when trying to sync my fork with remote after the last PR got merged, only noticed after I opened this PR - let me figure out what to do about that in the AM!
here's what you could do.
in your branch (for now) do
git checkout next
git fetch upstream
git reset upstream/next --hard
git checkout -b macstuff
git cherry-pick b416128
git push origin mastiff
presuming you have upstream set up to point at this repo and origin to point at your fork
Does much the same as the windows PR, but with objc timers - objc isn't my strong suit, so any sanity checking appreciated.
Also, my previous PR for the
applicationShouldTerminateAfterLastWindowClosed
implementation inadvertently led to a segfault on close, when we reached the section ofapplicationWillTerminate
where the window stuff is freed. According to the docs,[window close]
by default calls[window release]
, so my working theory is that it was leading to a double free when closed that way. To fix it, I implementedwindowWillClose
, and set the window member tonil
there. Then inapplicationWillTerminate
, I check ifself.window=nil
, and if it isn't, call[[self window] release]
, and that seems to have fixed it!