Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Add strong qualifier to backgroundColor. #37761

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,6 @@ FLUTTER_DARWIN_EXPORT
* }
* ```
*/
@property(readwrite, nonatomic, nullable) NSColor* backgroundColor;
@property(readwrite, nonatomic, nullable, strong) NSColor* backgroundColor;
Copy link
Member

@cbracken cbracken Nov 19, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use copy here rather than strong.

Suggested change
@property(readwrite, nonatomic, nullable, strong) NSColor* backgroundColor;
@property(readwrite, nonatomic, nullable, copy) NSColor* backgroundColor;

NSColor is immutable but there's no guarantee someone hasn't subclassed it. IIRC NSColor is actually a tagged pointer these days so yeah, this is probably inconsequential, but really copy is the right semantics to express.


@end