Exemple #1
0
        /// <summary>
        /// Performs a garbage collection using the specified generation in both this and the application being automated
        /// </summary>
        /// <param name="generation"></param>
        public static void GarbageCollect(int generation)
        {
            m_APE.AddFirstMessageGarbageCollect(generation);
            m_APE.SendMessages(EventSet.APE);
            m_APE.WaitForMessages(EventSet.APE);

            GC.Collect();
            GC.WaitForPendingFinalizers();
        }
Exemple #2
0
 private void buttonGCFull_Click(object sender, EventArgs e)
 {
     m_APE.AddFirstMessageGarbageCollect(System.GC.MaxGeneration);
     m_APE.SendMessages(EventSet.APE);
     m_APE.WaitForMessages(EventSet.APE);
 }