GarbageCollector Test; Wann dir der GC augerufen.

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