diff --git a/src/gui/rhi/qrhimetal.mm b/src/gui/rhi/qrhimetal.mm index 07bda4922dc..7f1438e4493 100644 --- a/src/gui/rhi/qrhimetal.mm +++ b/src/gui/rhi/qrhimetal.mm @@ -4412,10 +4412,7 @@ id QRhiMetalData::createMetalLib(const QShader &shader, QShader::Var id QRhiMetalData::createMSLShaderFunction(id lib, const QByteArray &entryPoint) { - NSString *name = [NSString stringWithUTF8String: entryPoint.constData()]; - id f = [lib newFunctionWithName: name]; - [name release]; - return f; + return [lib newFunctionWithName:[NSString stringWithUTF8String:entryPoint.constData()]]; } void QMetalGraphicsPipeline::setupAttachmentsInMetalRenderPassDescriptor(void *metalRpDesc, QMetalRenderPassDescriptor *rpD)