garbage collection - How do I free memory in .NET? -
how free memory in .net? correct do:
myarray = null; gc.collect();
or
myarray = nothing gc.collect()
or should wait garbage collection occur when os ready to?
thanks.
none of want. in managed runtime, releasing memory used reference non-deterministic , solely depend on when garbage collector runs , policy. regular types don't anything, relax , write business code.
Comments
Post a Comment