void OnDestroy() { isDestroyed = true; if (hqTextureHandler != null) { hqTextureHandler.Dispose(); hqTextureHandler = null; } if (gifPlayer != null) { gifPlayer.OnFrameTextureChanged -= UpdateTexture; gifPlayer.Dispose(); } if (assetPromise != null) { assetPromise.Forget(); assetPromise = null; } if (backgroundMaterial != null) { Object.Destroy(backgroundMaterial); } if (imageMaterial != null) { Object.Destroy(imageMaterial); } }
void OnDisable() { isEnabled = false; gifPlayer.Dispose(); ClearTimeline(); notes.Clear(); }
private void FrmGif_FormClosing(object sender, FormClosingEventArgs e) { _gif.Dispose(); }