WKColorButton leaks a UIColor. Found by clang static analyzer: 'WKColorButton' lacks a 'dealloc' instance method but must release '_color' -- #pragma mark - WKColorButton @interface WKColorButton : UIButton @property (nonatomic, strong) UIColor *color; + (instancetype)colorButtonWithColor:(UIColor *)color; @end @implementation WKColorButton + (instancetype)colorButtonWithColor:(UIColor *)color { WKColorButton *colorButton = [WKColorButton buttonWithType:UIButtonTypeCustom]; colorButton.color = color; colorButton.backgroundColor = color; return colorButton; } @end
<rdar://problem/61938137>
Created attachment 396770 [details] Patch v1
Comment on attachment 396770 [details] Patch v1 View in context: https://bugs.webkit.org/attachment.cgi?id=396770&action=review > Source/WebCore/page/Chrome.cpp:428 > #if PLATFORM(IOS_FAMILY) > return nullptr; > -#endif > +#else > notifyPopupOpeningObservers(); > return m_client.createColorChooser(client, initialColor); > +#endif We need UNUSED_PARAM here. I also think the "always-null color chooser" design strategy is a little messy, but that goes beyond this function
Created attachment 396803 [details] Patch for landing
Committed r260290: <https://trac.webkit.org/changeset/260290> All reviewed patches have been landed. Closing bug and clearing flags on attachment 396803 [details].