??????iphone?????????У??????е????й???????????????????leaks ?????????????????????Щ?????ios ???????÷???????leaks ????????????????????????????????汻?????????didReceiveMemoryWarning??????3??????????????????????????????Щ???????????Щ????????????£?
???????[UIImage imageNamed:]??????UI?????е??????????????????????t??????????
??????UIImage????????????????????????
????1.??imageNamed????
????[UIImage imageNamed:ImageName];
????2.?? imageWithContentsOfFile ????
????NSString *thumbnailFile = [NSString stringWithFormat:@"%@/%@.png"?? [[NSBundle mainBundle] resourcePath]?? fileName];
????UIImage *thumbnail = [UIImage imageWithContentsOfFile:thumbnailFile];
????3. ??initWithContentsFile????
????UIImage *image = [[UIImage alloc] initWithContentsOfFile:filePath]
????????????????????????????????????????????????imageNamed???????????????????????????????????????????У??????imageNamed??????????????image????????????????????? autoReleasePool?????????????????????????????????????????????????????????????????????????????檔
?????????????????????????????????????autoRelease?????autoReleasePool??????????
?????????????????release??????????檔release???????????????????????????????
???????? ?????б????????UITableView??reuse????
????- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
????static NSString *CellIdentifier = @"Cell";
????UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
????if (cell == nil) {
????cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
????}
????dequeueReusableCellWithIdentifier ???????????????????????????????????????
?????????????????????????????????????????autorelease pool???????????
????int main (int argc?? const char *argv[])
????{
????NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];int i?? j;for (i = 0; i < 100; i++ )
????{
????NSAutoreleasePool *loopPool = [[NSAutoreleasePool alloc] init]; for (j = 0; j < 100000; j++ )
????[NSString stringWithFormat:@"1234567890"];//???????????autorelease??? [loopPool release];
????}
????[pool release];return (0);
????} // main
???????????iPhone/Mac Objective-C????????????????(?)???????
????????????????SQLite????????治???????
????SQLite?????????????????????????????????????????????????????????????????SQLite??????????????????????????????
?????塢??UITableView ??cellForRowAtIndexPath ?????в????? stringWithFormat ????
?????????????????????к???????????? NSString *str = @“abc”?? ????initWithString??stringWithFormat??stringWithCString??????????????????????????????????????檔
???????2??????????http://www.cocoachina.com/bbs/read.php?tid-17652-fpage-9.html
????//
????- ()testStringSpeed:(*pool= testi??testnum= c??tm=(testi=;testi<testnum;testi++*beg= i??n=(i=;i<n;i++
????=+=??[textField stringValue]??testi+??[textField stringValue]??()tm/
????????stringWithFormat ??????????棬??????cellForRowAtIndexPath ????cell ??????????????????????滬??????????
???????????? colorWithPatternImage ?????й?
????self.view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"bg.png"]];
???????????????????view???????????????Щ?豸????????й?