fixing some redundant ref counting and a leak of the autocomplete data

source. r=hyatt.
This commit is contained in:
pinkerton%netscape.com 2002-05-28 18:42:21 +00:00
Родитель 39f40869dd
Коммит 0eb37f9cf8
8 изменённых файлов: 12 добавлений и 12 удалений

Просмотреть файл

@ -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];