summaryrefslogtreecommitdiffstats
path: root/src/gui/rhi
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2023-01-25 22:38:25 +0100
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2023-01-26 15:19:33 +0100
commit780813d9b6bfc58aa45571c367071c3a44fb2b44 (patch)
treebd36b38e83e9b6fc345b19855cbb82e5acadbace /src/gui/rhi
parent6854d35393d416b867a83e375e46b3096691a0a1 (diff)
rhi: Remove manual release of autoreleased NSString
The [NSString stringWithUTF8String:] function returns an autoreleased object, so we don't need to manually release it. Doing so results in a crash when the surrounding autorelease pool is drained. Pick-to: 6.5 6.4 6.2 Change-Id: I3dca01e2771d4010e582c2bf770f3d2281343dc3 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Diffstat (limited to 'src/gui/rhi')
-rw-r--r--src/gui/rhi/qrhimetal.mm5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/gui/rhi/qrhimetal.mm b/src/gui/rhi/qrhimetal.mm
index a2b90e99a8..cf9112fe54 100644
--- a/src/gui/rhi/qrhimetal.mm
+++ b/src/gui/rhi/qrhimetal.mm
@@ -4449,10 +4449,7 @@ id<MTLLibrary> QRhiMetalData::createMetalLib(const QShader &shader, QShader::Var
id<MTLFunction> QRhiMetalData::createMSLShaderFunction(id<MTLLibrary> lib, const QByteArray &entryPoint)
{
- NSString *name = [NSString stringWithUTF8String: entryPoint.constData()];
- id<MTLFunction> f = [lib newFunctionWithName: name];
- [name release];
- return f;
+ return [lib newFunctionWithName:[NSString stringWithUTF8String:entryPoint.constData()]];
}
void QMetalGraphicsPipeline::setupAttachmentsInMetalRenderPassDescriptor(void *metalRpDesc, QMetalRenderPassDescriptor *rpD)