Darwin: Disable QMacAutoReleasePool tracker unless explicitly enabled
There's a few orders of magnitude of overhead using QMacAutoReleasePool with the tracker enabled, so disable it even for debug builds, unless explicit auto release pool debugging has been enabled via the environment variable QT_DARWIN_DEBUG_AUTORELEASEPOOLS. Pick-to: 6.5 Change-Id: Iec00c703eb21e1914903954cfd02f9f6b1ec2a1f Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This commit is contained in:
parent
59c686080d
commit
7cf7e88417
@ -230,6 +230,10 @@ QMacAutoReleasePool::QMacAutoReleasePool()
|
||||
: pool([[NSAutoreleasePool alloc] init])
|
||||
{
|
||||
#ifdef QT_DEBUG
|
||||
static const bool debugAutoReleasePools = qEnvironmentVariableIsSet("QT_DARWIN_DEBUG_AUTORELEASEPOOLS");
|
||||
if (!debugAutoReleasePools)
|
||||
return;
|
||||
|
||||
Class trackerClass = [QMacAutoReleasePoolTracker class];
|
||||
|
||||
void *poolFrame = nullptr;
|
||||
|
Loading…
Reference in New Issue
Block a user