示例#1
0
    public static void Shutdown()
    {
        var sw = Stopwatch.StartNew();

        Logger.Info("TIG shutdown started...");
        MainWindow?.Dispose();
        RenderingDevice?.Dispose();
        MdfFactory?.Dispose();
        ShapeRenderer2d?.Dispose();
        ShapeRenderer3d?.Dispose();
        TextLayouter?.Dispose();
        Sound?.Dispose();
        Fonts?.Dispose();

        DynamicScripting = null;
        FS              = null;
        Mouse           = null;
        Keyboard        = null;
        SystemEventPump = null;
        MainWindow      = null;
        MessageQueue    = null;
        RenderingDevice = null;
        DebugUI         = null;
        MdfFactory      = null;
        ShapeRenderer2d = null;
        ShapeRenderer3d = null;
        TextLayouter    = null;
        Sound           = null;
        Fonts           = null;
        Console         = null;
        Logger.Info("TIG shutdown completed in {0}.", sw.Elapsed);
    }
 public void Dispose()
 {
     _indexBuffer.Dispose();
     _device?.Dispose();
 }