开发者

using finch by zoul, is loading 12MB of wavs into an array causing an erratic crash for my users at launch?

So my code works for about 90% of people. The rest get a crash at launch. I figure with all the memory I'm tying up here, this is the problem?

Maybe i shouldn't use an array as such?

for(i=60;i<80;i++){
  myNewString = [NSMutableString stringWithFormat:@"%i", i ];        
    if (finchKeys[i]==nil)
        finchKeys[i] = [[Sound alloc] initWithFile:
        [[NSBundle mainBundle] URLForResource:myNewStri开发者_如何转开发ng withExtension:@"wav"]];

}

Is there something I can call to free up memory before I load my wavs?

thanks!!


I imagine you're not playing all of the wavs at once. Why not just save the wav url in your Sound class instead of the whole wav? Then you can just load each wav when you need to play it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜