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

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -