/// <summary> /// Called when the app is exiting, or the device is being changed, this /// function deletes any device-dependent objects. /// </summary> protected override void DeleteDeviceObjects(System.Object sender, System.EventArgs e) { if (terrainMesh != null) { terrainMesh.Dispose(); } if (skyBoxMesh != null) { skyBoxMesh.Dispose(); } for (int i = 0; i < treeTextureFileNames.Length; i++) { if (treeTextures[i] != null) { treeTextures[i].Dispose(); } } if (treeVertexBuffer != null) { treeVertexBuffer.Dispose(); } }
/// <summary> /// Called when the app is exiting, or the device is being changed, this /// function deletes any device-dependent objects. /// </summary> protected override void DeleteDeviceObjects(System.Object sender, System.EventArgs e) { terrainMesh.Dispose(); helicopterMesh.Dispose(); mirrorVertexBuffer.Dispose(); terrainMesh = null; helicopterMesh = null; mirrorVertexBuffer = null; }
/// <summary> /// Called when the app is exiting, or the device is being changed, this /// function deletes any device-dependent objects. /// </summary> protected override void DeleteDeviceObjects(System.Object sender, System.EventArgs e) { blendObject.Dispose(); }