mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 20:30:37 +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
|
@ -48,7 +48,7 @@
|
|||
|
||||
- (NSArray *)types
|
||||
{
|
||||
return RETAIN([NSArray arrayWithArray: _types]);
|
||||
return [NSArray arrayWithArray: _types];
|
||||
}
|
||||
|
||||
- (BOOL)setDataProvider:(id<NSPasteboardItemDataProvider>)dataProvider
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue