Search code examples
unity-game-enginenull-checkil2cpp

unity "NullCheck" hold on to memory


"Null-Check" hold on to lots of memory. why? what happened? Anybody encounter the problem?

Null-Check hold on to memory


Solution

  • Disable Null check while using IL2CPP with the Il2CppSetOptions attribute in every function.

    [Il2CppSetOption(Option.NullChecks, false)]
    void functionName(){
    
    }