Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macOS standalone request_callback timer #294

Closed
wants to merge 3 commits into from

Conversation

MeijisIrlnd
Copy link
Contributor

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 of applicationWillTerminate 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 implemented windowWillClose, and set the window member to nil there. Then in applicationWillTerminate, I check if self.window=nil, and if it isn't, call [[self window] release], and that seems to have fixed it!

@baconpaul
Copy link
Collaborator

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

@MeijisIrlnd
Copy link
Contributor Author

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!

@baconpaul
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants