analyzer warning: super init assign to self and check for nil , NSImageView leaking (contentView is a strong reference, therefore release it after assigning)
This commit is contained in:
@@ -26,12 +26,13 @@
|
|||||||
|
|
||||||
- (id)init
|
- (id)init
|
||||||
{
|
{
|
||||||
self = [super init];
|
if (self = [super init])
|
||||||
if (self) {
|
{
|
||||||
m_dockTile = [NSApplication sharedApplication].dockTile;
|
m_dockTile = [NSApplication sharedApplication].dockTile;
|
||||||
NSImageView* iv = [[NSImageView alloc] init];
|
NSImageView* iv = [[NSImageView alloc] init];
|
||||||
[iv setImage:[NSApplication sharedApplication].applicationIconImage];
|
[iv setImage:[NSApplication sharedApplication].applicationIconImage];
|
||||||
[m_dockTile setContentView:iv];
|
[m_dockTile setContentView:iv];
|
||||||
|
[iv release];
|
||||||
|
|
||||||
m_progIndicator = [[NSProgressIndicator alloc] initWithFrame:NSMakeRect(0.0f, 16.0f, m_dockTile.size.width, 24.)];
|
m_progIndicator = [[NSProgressIndicator alloc] initWithFrame:NSMakeRect(0.0f, 16.0f, m_dockTile.size.width, 24.)];
|
||||||
m_progIndicator.style = NSProgressIndicatorBarStyle;
|
m_progIndicator.style = NSProgressIndicatorBarStyle;
|
||||||
|
|||||||
Reference in New Issue
Block a user