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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user