Exemple #1
0
        /// <summary>
        /// Clean up the KernelManager's underlying connections and resources
        /// </summary>
        public void Dispose()
        {
            // If we fail to send the shutdown request, proceed with killing the kernel process
            // directly.
            if (!SendShutdownRequest())
            {
                KillKernelProcess();
            }

            if (ConnectionInformation != null)
            {
                ConnectionInformation.CleanupConnectionFile();
            }

            // Ensure all of our objects are cleaned up and nulled out
            ControlChannel = null;
            ControlThread  = null;
            Kernel         = null;
        }