Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/intern
diff options
context:
space:
mode:
authorCorbin Dunn <corbin>2021-03-03 18:55:20 +0300
committerAnkit Meel <ankitjmeel@gmail.com>2021-03-03 18:55:20 +0300
commit87c949a3bddce445e56337efc6764e29dcfab36c (patch)
treeeb5386b36da0fdc787ee7d32cfb880883c59e72c /intern
parentb9bb69a1147e76460ab92b7bb97f493e2a26d9c7 (diff)
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
Diffstat (limited to 'intern')
-rw-r--r--intern/ghost/intern/GHOST_WindowViewCocoa.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/intern/ghost/intern/GHOST_WindowViewCocoa.h b/intern/ghost/intern/GHOST_WindowViewCocoa.h
index 14c70382916..f47e02704b2 100644
--- a/intern/ghost/intern/GHOST_WindowViewCocoa.h
+++ b/intern/ghost/intern/GHOST_WindowViewCocoa.h
@@ -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