Крипто-анализ

[bitcoin/bitcoin] macOS: Disable AppNap (#12783)

jonasschnelli commented on this pull request.

> + NSActivityLatencyCritical) & + ~(NSActivitySuddenTerminationDisabled | + NSActivityAutomaticTerminationDisabled); + + if ([[NSProcessInfo processInfo] respondsToSelector:@selector(beginActivityWithOptions:reason:)]) + priv->activityId = [[NSProcessInfo processInfo ] beginActivityWithOptions: activityOptions reason:@(strReason)]; +#endif +} + +CAppNapInhibitor::~CAppNapInhibitor() +{ +#if defined(MAC_OS_X_VERSION_MAX_ALLOWED) && MAC_OS_X_VERSION_MAX_ALLOWED >= 1090 + if ([[NSProcessInfo processInfo] respondsToSelector:@selector(endActivity:)]) + [[NSProcessInfo processInfo] endActivity:priv->activityId]; +#endif + delete priv;
Since we are only holding a `NSObject` pointer, is this deallocation really required or could it even be missing with the autorelease pool?

Добавить комментарий