Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. COThank you Steven. I am not using NSUserDefaults. However, I wonder if my last comment to Brad's response makes sense. I believe that I may have been getting away with something that I should have not been allowed to do. Namely, the releasing of the NSMutableArray and then filling it again with each search. I will put some code in my next comment. (I'm almost out of space in this block of text.)
      singulars
    2. CO// Used to do a release here: [list removeAllObjects]; while(sqlite3_step(statement) == SQLITE_ROW && (limit == NO || [list count] <= INITSEARCHROWS)) { NSMutableArray *columns = [[NSMutableArray alloc] init]; for(int i = 0; i < 7; i++) { NSString *value; char *column = (char *)sqlite3_column_text(statement, i); if (column == nil) { value = [[NSString alloc] initWithUTF8String:""]; } else { value = [[NSString alloc] initWithUTF8String:column]; } [columns addObject:value]; [value release]; } [list addObject:columns]; [columns release]; } [sql closeDatabase]; [sql dealloc]; }
      singulars
    3. COOK. Most of this looks OK. I do have a question on who owns the memory from the "sqlite3_column_text(statement, i);" call. Likewise, the [[NSMutableArray alloc] init] really should be [[NSMutableArray alloc] initWithCapacity:8]. The NSMutableArray did NOT override init, there is a chance some code is not being called that really should be. Also, use the convenience methods of "arrayWithCapacity:", "stringWithUTF8String:". They will remove lots of releases from your code and make your life easier.
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload