From 3aeeb8d113f740293435bae3ee1c7316fb984a60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Thu, 21 Apr 2022 15:13:38 +0200 Subject: [PATCH] macOS: Remove un-needed auto-release pools in QCocoaInputContext These functions do not push much pressure on memory to warrant separate pool, and are otherwise called as part of the normal runloop which has its own pool. Change-Id: If84a899edc4e8cefbf58ecb55d46848ccd69b33b Reviewed-by: Timur Pocheptsov --- src/plugins/platforms/cocoa/qcocoainputcontext.mm | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/plugins/platforms/cocoa/qcocoainputcontext.mm b/src/plugins/platforms/cocoa/qcocoainputcontext.mm index 7194da5433..265a8e133f 100644 --- a/src/plugins/platforms/cocoa/qcocoainputcontext.mm +++ b/src/plugins/platforms/cocoa/qcocoainputcontext.mm @@ -116,7 +116,6 @@ void QCocoaInputContext::commit() if (!view) return; - QMacAutoReleasePool pool; [view unmarkText]; [view.inputContext discardMarkedText]; @@ -147,7 +146,6 @@ void QCocoaInputContext::reset() if (!view) return; - QMacAutoReleasePool pool; if (NSTextInputContext *ctxt = [NSTextInputContext currentInputContext]) { [ctxt discardMarkedText]; [view unmarkText];