macOS/Ghost: Fix memory leak.

`new` allocates a new object that needs to be autoreleased.

Reviewed By: #platform_macos, sebbas, ankitm
Maniphest Tasks: T86222
Differential Revision: https://developer.blender.org/D10597
This commit is contained in:
Corbin Dunn 2021-03-03 21:25:20 +05:30 committed by Ankit Meel
parent b9bb69a114
commit 87c949a3bd
1 changed files with 2 additions and 2 deletions

View File

@ -253,7 +253,7 @@
- (NSAttributedString *)attributedSubstringFromRange:(NSRange)range
{
return [NSAttributedString new]; // XXX does this leak?
return [[[NSAttributedString alloc] init] autorelease];
}
- (NSRange)markedRange
@ -284,7 +284,7 @@
- (NSArray *)validAttributesForMarkedText
{
return [NSArray array]; // XXX does this leak?
return [NSArray array];
}
@end