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:
parent
e61922b4c7
commit
0a178ca374
@ -26,12 +26,13 @@
|
||||
|
||||
- (id)init
|
||||
{
|
||||
self = [super init];
|
||||
if (self) {
|
||||
if (self = [super init])
|
||||
{
|
||||
m_dockTile = [NSApplication sharedApplication].dockTile;
|
||||
NSImageView* iv = [[NSImageView alloc] init];
|
||||
[iv setImage:[NSApplication sharedApplication].applicationIconImage];
|
||||
[m_dockTile setContentView:iv];
|
||||
[iv release];
|
||||
|
||||
m_progIndicator = [[NSProgressIndicator alloc] initWithFrame:NSMakeRect(0.0f, 16.0f, m_dockTile.size.width, 24.)];
|
||||
m_progIndicator.style = NSProgressIndicatorBarStyle;
|
||||
|
Loading…
Reference in New Issue
Block a user