开发者

how to release presentModalViewController from stack Memory in iphone?

I am currently working on a project in which I am calling other view through below way through out the project :---

frmImage *frmImageOne = [[frmImage alloc]initWithNibName:@"frmImage" bundle:nil]; 
[self presentModalViewController:frmImageOne开发者_C百科 animated:YES];
[frmImageOne release];

Exactly what I want is that when I load my application in IPhone device it gets terminated due to StackOverflow by presentModalViewController.that is nothing but memory leakage .

So please can any body tel me how to release presentModelViewcontroller from stack memory through codes.

Thanks in Advance


Stack overflow has nothing to do with memory leakage, and you're not storing frmImage on the stack. ObjC can't store objects on the stack. It only stores pointers on the stack; objects themselves are always stored on the heap in ObjC.

If you're getting a stack overflow, then you're almost certainly in an infinite recursion loop. Is your stack trace hundreds or thousands of frames deep of the same calls? That's the usual cause.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜