private void f_FormClosing(object sender, FormClosingEventArgs e) { if (ObjModelPath == "") { return; } render.RemoveModel("Model", 0); render.Clear(); elementHost1.Dispose(); try { Directory.Delete(tmpPath, true); } catch { } }