- Home /
Question by
ColinHak · Jun 12, 2012 at 01:50 PM ·
memory leak
Mono memory leak?
I have an sample test it!
public class A
{
public byte[] bf;
public A()
{
bf = new byte[1024*1024*100];//100MB
}
}
void OnGUI()
{
if(GUILayout.Button("t"))
{
A a = new A();
}
}
Unity3d build-in profiler check memory is incorrect! See window task manager! Any idear???
Comment
Perhaps you could describe the difference you are seeing?
Answer by rutter · Jun 12, 2012 at 05:22 PM
May be helpful to read up on Mono's "large object space", which is equivalent to Microsoft's "large object heap":
I'm not an expert on the distinction, but it sounds like objects larger than 8,000 bytes are allocated into memory which is managed directly by the OS, as opposed to Mono's garbage collector. Unity's profiler doesn't seem to measure that correctly.
There is no SGen in Unity, because it uses old $$anonymous$$ono. We're stuck with Boehm ins$$anonymous$$d.
Your answer