gc 和 out

GC回收堆上的内存
避免方法
1)减少new产生对象的次数
2)使用公用的对象(静态成员)

3)将String换为StringBuilder

//编译报错需要给int赋值

    public int RRay(out int hit)     {                  //hit.intValue = 1;                  return hit;     }

猜你喜欢

转载自blog.csdn.net/a133900029/article/details/80869839
今日推荐