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. Change-Id: I3dca01e2771d4010e582c2bf770f3d2281343dc3 Reviewed-by: Andy Nichols <andy.nichols@qt.io> (cherry picked from commit 780813d9b6bfc58aa45571c367071c3a44fb2b44) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
28c0af6dc3
commit
8eee5acfb2
@ -3724,10 +3724,7 @@ id<MTLLibrary> QRhiMetalData::createMetalLib(const QShader &shader, QShader::Var
|
|||||||
|
|
||||||
id<MTLFunction> QRhiMetalData::createMSLShaderFunction(id<MTLLibrary> lib, const QByteArray &entryPoint)
|
id<MTLFunction> QRhiMetalData::createMSLShaderFunction(id<MTLLibrary> lib, const QByteArray &entryPoint)
|
||||||
{
|
{
|
||||||
NSString *name = [NSString stringWithUTF8String: entryPoint.constData()];
|
return [lib newFunctionWithName:[NSString stringWithUTF8String:entryPoint.constData()]];
|
||||||
id<MTLFunction> f = [lib newFunctionWithName: name];
|
|
||||||
[name release];
|
|
||||||
return f;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool QMetalGraphicsPipeline::create()
|
bool QMetalGraphicsPipeline::create()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user