iOS ??????????
???????????? ???????[ 2014/8/7 10:38:36 ] ????????iOS ?????? ???
??????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???????????????Щ?豸????????й?
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11