コード例 #1
0
ファイル: Language.cs プロジェクト: robguyoncourt/APE
        /// <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();
        }
コード例 #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);
 }