Tip: Programmatischer Aufruf durch System.GC.Collect(); möglich. ------------------------------------------------------------------------------------ using System; using System.Collections; public class GarbageCollector { private int m_intValue; public GarbageCollector(int intValue) { this.m_intValue = intValue; Console.Out.WriteLine("Object Constructor : " + intValue); } ~GarbageCollector() { Console.Out.WriteLine("Object Destructor : " + this.m_intValue); } public static void Main() { for(int intCounter=0; intCounter<100000; intCounter++) { GarbageCollector obj = new GarbageCollector(intCounter); } } } --------------------------------- Garbage Collector-Grundlagen und Tipps zur Leistung
Latest Posts
Popular Posts
-
I am *very* keen on automating tests, so I was looking into unit testing a WCF service. If I say "unit test", I mean a fast ,...
-
It's easy I thought, just select the Property of the EntityType and set the Default Value in the Properties window to: DateTime.Now ...
-
*Updated* 26. September 2010: Updated with comments from Adam Cogan *Updated* 27. September 2010: Updated the comparison between anonymo...
No comments:
Post a Comment