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:
parent
b9bb69a114
commit
87c949a3bd
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue