Fix macOS memory leaks, also avoid false positive warnings from clang analyzer

__clang_analyzer__ is a constant that only is defined during analyze build, this helps avoiding false positives as long as there is no specific way to silence analyzer messages
This commit is contained in:
Stefan Csomor
2019-04-21 23:52:37 +02:00
parent d0a84a6266
commit 5020a810db
7 changed files with 143 additions and 47 deletions

View File

@@ -3563,12 +3563,15 @@ bool wxWidgetCocoaImpl::EnableTouchEvents(int eventsMask)
}
else // We do want to have gesture events.
{
// clang does not see that the owning object always destroys its extra field
#ifndef __clang_analyzer__
wxCocoaGestures::StoreForObject
(
this,
new wxCocoaGesturesImpl(this, m_osxView, eventsMask)
);
#endif
[m_osxView setAcceptsTouchEvents:YES];
}