class A {}
struct B {}
class Main
{
public static void Foo()
{
new A();
new B();
}
}
を変換すると↓みたいに(抜粋)なる
B_t3938918186 V_0;
memset(&V_0, 0, sizeof(V_0));
{
A_t3938918183 * L_0 = (A_t3938918183 *)il2cpp_codegen_object_new(A_t3938918183_il2cpp_TypeInfo_var);
A__ctor_m4003197151(L_0, /*hidden argument*/NULL);
Initobj (B_t3938918186_il2cpp_TypeInfo_var, (&V_0));
return;
}
new B()
はちゃんとスタックメモリに乗る。