fixing some redundant ref counting and a leak of the autocomplete data
source. r=hyatt. git-svn-id: svn://10.0.0.236/trunk@122223 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -33,7 +33,7 @@
|
||||
{
|
||||
if ((self = [super init])) {
|
||||
mResults = nil;
|
||||
mIconImage = [[NSImage imageNamed:@"globe_ico"] autorelease];
|
||||
mIconImage = [NSImage imageNamed:@"globe_ico"];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@ NS_IMPL_ISUPPORTS1(AutoCompleteListener, nsIAutoCompleteListener)
|
||||
[mTableView setAction:@selector(onRowClicked:)];
|
||||
|
||||
// Create the icon column if we have a proxy icon
|
||||
if (mProxyIcon != nil) {
|
||||
if (mProxyIcon) {
|
||||
column = [[[NSTableColumn alloc] initWithIdentifier:@"icon"] autorelease];
|
||||
[column setWidth:[mProxyIcon frame].origin.x + [mProxyIcon frame].size.width];
|
||||
dataCell = [[[NSImageCell alloc] initImageCell:nil] autorelease];
|
||||
@@ -121,7 +121,7 @@ NS_IMPL_ISUPPORTS1(AutoCompleteListener, nsIAutoCompleteListener)
|
||||
[scrollView setDocumentView: mTableView];
|
||||
|
||||
// construct the datasource
|
||||
mDataSource = [[[CHAutoCompleteDataSource alloc] init] retain];
|
||||
mDataSource = [[CHAutoCompleteDataSource alloc] init];
|
||||
[mTableView setDataSource: mDataSource];
|
||||
|
||||
[mPopupWin setContentView:scrollView];
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
{
|
||||
if ((self = [super init])) {
|
||||
mResults = nil;
|
||||
mIconImage = [[NSImage imageNamed:@"globe_ico"] autorelease];
|
||||
mIconImage = [NSImage imageNamed:@"globe_ico"];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@ NS_IMPL_ISUPPORTS1(AutoCompleteListener, nsIAutoCompleteListener)
|
||||
[mTableView setAction:@selector(onRowClicked:)];
|
||||
|
||||
// Create the icon column if we have a proxy icon
|
||||
if (mProxyIcon != nil) {
|
||||
if (mProxyIcon) {
|
||||
column = [[[NSTableColumn alloc] initWithIdentifier:@"icon"] autorelease];
|
||||
[column setWidth:[mProxyIcon frame].origin.x + [mProxyIcon frame].size.width];
|
||||
dataCell = [[[NSImageCell alloc] initImageCell:nil] autorelease];
|
||||
@@ -121,7 +121,7 @@ NS_IMPL_ISUPPORTS1(AutoCompleteListener, nsIAutoCompleteListener)
|
||||
[scrollView setDocumentView: mTableView];
|
||||
|
||||
// construct the datasource
|
||||
mDataSource = [[[CHAutoCompleteDataSource alloc] init] retain];
|
||||
mDataSource = [[CHAutoCompleteDataSource alloc] init];
|
||||
[mTableView setDataSource: mDataSource];
|
||||
|
||||
[mPopupWin setContentView:scrollView];
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
{
|
||||
if ((self = [super init])) {
|
||||
mResults = nil;
|
||||
mIconImage = [[NSImage imageNamed:@"globe_ico"] autorelease];
|
||||
mIconImage = [NSImage imageNamed:@"globe_ico"];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@ NS_IMPL_ISUPPORTS1(AutoCompleteListener, nsIAutoCompleteListener)
|
||||
[mTableView setAction:@selector(onRowClicked:)];
|
||||
|
||||
// Create the icon column if we have a proxy icon
|
||||
if (mProxyIcon != nil) {
|
||||
if (mProxyIcon) {
|
||||
column = [[[NSTableColumn alloc] initWithIdentifier:@"icon"] autorelease];
|
||||
[column setWidth:[mProxyIcon frame].origin.x + [mProxyIcon frame].size.width];
|
||||
dataCell = [[[NSImageCell alloc] initImageCell:nil] autorelease];
|
||||
@@ -121,7 +121,7 @@ NS_IMPL_ISUPPORTS1(AutoCompleteListener, nsIAutoCompleteListener)
|
||||
[scrollView setDocumentView: mTableView];
|
||||
|
||||
// construct the datasource
|
||||
mDataSource = [[[CHAutoCompleteDataSource alloc] init] retain];
|
||||
mDataSource = [[CHAutoCompleteDataSource alloc] init];
|
||||
[mTableView setDataSource: mDataSource];
|
||||
|
||||
[mPopupWin setContentView:scrollView];
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
{
|
||||
if ((self = [super init])) {
|
||||
mResults = nil;
|
||||
mIconImage = [[NSImage imageNamed:@"globe_ico"] autorelease];
|
||||
mIconImage = [NSImage imageNamed:@"globe_ico"];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@ NS_IMPL_ISUPPORTS1(AutoCompleteListener, nsIAutoCompleteListener)
|
||||
[mTableView setAction:@selector(onRowClicked:)];
|
||||
|
||||
// Create the icon column if we have a proxy icon
|
||||
if (mProxyIcon != nil) {
|
||||
if (mProxyIcon) {
|
||||
column = [[[NSTableColumn alloc] initWithIdentifier:@"icon"] autorelease];
|
||||
[column setWidth:[mProxyIcon frame].origin.x + [mProxyIcon frame].size.width];
|
||||
dataCell = [[[NSImageCell alloc] initImageCell:nil] autorelease];
|
||||
@@ -121,7 +121,7 @@ NS_IMPL_ISUPPORTS1(AutoCompleteListener, nsIAutoCompleteListener)
|
||||
[scrollView setDocumentView: mTableView];
|
||||
|
||||
// construct the datasource
|
||||
mDataSource = [[[CHAutoCompleteDataSource alloc] init] retain];
|
||||
mDataSource = [[CHAutoCompleteDataSource alloc] init];
|
||||
[mTableView setDataSource: mDataSource];
|
||||
|
||||
[mPopupWin setContentView:scrollView];
|
||||
|
||||
Reference in New Issue
Block a user