protected override void OnClosed(EventArgs e) { model?.Dispose(); model = null; base.OnClosed(e); }
public void TestLoadmodel() { var form = new RenderForm(); RenderContext Context = new RenderContext(); ScreenContext _scContext = Context.Initialize(form); PMXModel Model = PMXModelWithPhysics.OpenLoad(@"C:\Users\ZhiYong\Documents\CodeBase\mmflex\debug\1.pmx", Context); Model.Transformer.Position = new Vector3(0, 0, 0); _scContext.WorldSpace.AddResource(Model); _scContext.Dispose(); Model.Dispose(); Context.Dispose(); }