.net - Can I force memory cleanup in C#? -


I've heard that C # still does not free up memory even if you did it with it. Can I force C # to free the memory?

I am using Visual Studio 2008 Express. Is this the case?

P.S. I do not have problems with C # and this is how I manage memory I'm just curious.

Jim,

You've heard it correctly through a system Periodically clears the memory, which is called garbage collector. You can "force" the garbage collection through a call like the call below.

  GC Compiler ();  

I strongly advise you to read. Edit 1: "Force" was in the quote to be more clear in the form of another poster, it really only suggests that you can not actually do this at a specific point on time. . Therefore link to article on garbage collection. Edit in the net

Edit 2: I realized that everyone here has been directly answered to your main question. The use of the Visual Studio 2008 Express for your secondary question will still use the net framework, which does the garbage collection. So if you ever upgrade to a professional edition, you still have the same memory management capabilities / limitations. <3 px> Edit 3: In the final form gives some good indication of what is appropriate. In fact, if you are building an object that has access to important resources, or if you are using such an object, then using IDispose and / or using statement Use of the benefits will automatically call the dissection method, even if exceptions are thrown. This does not mean that you do not need to specify run finlers ...


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

php - Multiple Select with Explode: only returns the word "Array" -

php - jQuery AJAX Post not working -