зеркало из https://github.com/mozilla/pjs.git
fixing some redundant ref counting and a leak of the autocomplete data
source. r=hyatt.
This commit is contained in:
Родитель
39f40869dd
Коммит
0eb37f9cf8
|
@ -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];
|
||||
|
|
Загрузка…
Ссылка в новой задаче