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

Codechange: [OSX] Use std::unique_ptr with a custom deleter to simply… #7717

Merged
merged 1 commit into from Nov 1, 2019

Conversation

michicc
Copy link
Member

@michicc michicc commented Sep 1, 2019

… memory management of Core Foundation types.

@michicc
Copy link
Member Author

@michicc michicc commented Sep 1, 2019

One thing I'm not totally happy about are all the extra .get()s, but eliminating them would either mean rolling a custom duplicate of std::unique_ptr or at least subclassing it. OTOH, there's a reason the standard does it this way to clearly indicate when ownership is transferred and when not.

src/os/macosx/macos.h Outdated Show resolved Hide resolved
@michicc
Copy link
Member Author

@michicc michicc commented Sep 29, 2019

Sep 02 20:49:36 <michi_cc> andythenorth: Can you check if I broke anything with #7717 when it is convenient?
Sep 02 20:53:04 sure :)
Sep 02 20:59:54 michi_cc: it builds
Sep 02 20:59:59 not sure what else to test meaningfully :)
Sep 02 21:00:51 savegames load and run

@LordAro LordAro force-pushed the pr/cfrelease branch 2 times, most recently from ce5edd2 to bba5acb Compare Oct 25, 2019
@michicc michicc merged commit d5a9bd4 into OpenTTD:master Nov 1, 2019
8 checks passed
@michicc michicc deleted the pr/cfrelease branch Nov 1, 2019
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.

None yet

3 participants