在....ViewController.m
int count = 1;
-(IBAction)butPressed:(id)sender
{
NSLog(*"%d", count);
const unichar data[100000];
int i;
for(i=0; i<10; i++)
{
NSString *str = [[NSString alloc] initWithCharacters:data length:100000];
}
count++;
}
在......ViewController.h
-(IBAction)butPressed:(id)sender;
請問這堆東東是什麼意思?書上寫說回一直產生物件,讓記憶體不足而當機。哪位高手可以幫我解釋?謝謝