mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 13:10:59 +00:00
Remove RETAIN() when returning -[NSPasteboardItem types].
Objective-C memory management policy specifies that methods named with alloc, new, copy and mutableCopy are the ones that return objects with refcount 1. Additionally, `@property (..., copy, ...)` only modifies the setter; the getter still returns the object as-is. While it should be correct to create a new immutable object every time, we should not create an object with refcount 1, but an autoreleased object.
This commit is contained in:
parent
4026fbc2be
commit
1cb15c2735
2 changed files with 8 additions and 1 deletions
|
@ -1,3 +1,10 @@
|
|||
2017-07-31 Ivan Vucica <ivan@vucica.net>
|
||||
|
||||
* Source/NSTextList.m: Add _startingItemNumber-related TODOs to
|
||||
NSTextList.
|
||||
* Source/NSPasteboardItem: Remove RETAIN() when returning
|
||||
-[NSPasteboardItem types].
|
||||
|
||||
2017-07-28 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSMenuView.m (-attachSubmenuForItemAtIndex:): We should
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
|
||||
- (NSArray *)types
|
||||
{
|
||||
return RETAIN([NSArray arrayWithArray: _types]);
|
||||
return [NSArray arrayWithArray: _types];
|
||||
}
|
||||
|
||||
- (BOOL)setDataProvider:(id<NSPasteboardItemDataProvider>)dataProvider
|
||||
|
|
Loading…
Reference in a new issue