On Mar 5, 2009, at 12:26 PM, James Cicenia wrote:
OK That worked but now that I got you:
Why is it complaining about the indicated array below:
while (sqlite3_step(statement) == SQLITE_ROW) {
//find subtype as key in the dict first
if(![aDict objectForKey: [NSString stringWithUTF8String:(char
*)sqlite3_column_text(statement, 2)]]){
NSMutableArray *tmparray = [[NSMutableArray alloc]init];
<<<<<====== ===== Says it leaks?
[aDict setValue:tmparray forKey: [NSString stringWithUTF8String:
(char *)sqlite3_column_text(statement, 2)]];
[tmparray release];
}
May be a false positive, unless there is other code that may cause it
to leak. But, the following:
subtypeArray = [aDict objectForKey: [NSString stringWithUTF8String:
(char *)sqlite3_column_text(statement, 2)]];
[subtypeArray addObject: [NSString stringWithUTF8String:(char
*)sqlite3_column_text(statement, 0)]];
[aDict setValue:subtypeArray forKey: [NSString stringWithUTF8String:
(char *)sqlite3_column_text(statement, 2)]];
}
If subtypeArray is mutable, as it appears to be, the last statement is
useless and potentially dangerous.
Best,
Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"
_______________________________________________
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to arch...@mail-archive.com