开发者

How much memory am I allowed to allocate in Monotouch?

The question says it all - I'd like to know how much memory am开发者_StackOverflow社区 I allowed to allocate before my app will eventually be killed by iOS. This is assuming that I still hold references to that memory, so it will not be GC'd.

Thanks,

Adrian


You can allocate as much as you want until you receive a memory warning. There is no limit but general comments i have read the mark to be around 3Mb. :-)

Each view controller gets the message - (void)didReceiveMemoryWarning which is when you need to dealloc cached images etc to free the memory before you app gets terminated by the OS. In case you program optimally you should be able to do so with handling the memory warning.


The same applies to monotouch as the method to override would be

public override void ReceiveMemoryWarning(UIApplication application)

according to this question.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜