Why is our MonoTouch app breaking in the garbage collector? It is not out of memory

前端 未结 2 1084
渐次进展
渐次进展 2020-12-01 11:02

We have a simple question, but the cause is complicated. We are experienced developers, and have done a lot of research into what may be causing it. We are hoping that MonoT

2条回答
  •  甜味超标
    2020-12-01 11:44

    You asked:

    "Internal kernel structures could not be allocated. ... How could this be?

    One reason could be the fragmentation of the memory, for more on this topic see for example How to solve Memory Fragmentation. This may belong to other internal resources like file pointers, too. Therefore the problem is only visible on the resource limited devices and not in the simulator.

    To find non obvious resource leaks, too: Are you using the Static Code Analysis (FxCop) of Visual Studio? Some of the rules give hints to free resources explicitly, e.g. to call Dispose or suggests to implement the IDispose interface.

提交回复
热议问题