示例#1
0
 protected override void OnDestroy()
 {
     if (cameraSource != null)
     {
         cameraSource.Dispose();
         cameraSource = null;
     }
     if (frameMatrix != null)
     {
         frameMatrix.Dispose();
     }
     frameMatrix = null;
     Texture2D.Destroy(texture);
     texture = null;
     comicFilter.Dispose();
     comicFilter = null;
 }
示例#2
0
        /// <summary>
        /// Releases all resource.
        /// </summary>
        private void Dispose()
        {
            NatCam.Release();

            if (matrix != null)
            {
                matrix.Dispose();
                matrix = null;
            }
            if (texture != null)
            {
                Texture2D.Destroy(texture);
                texture = null;
            }

            didUpdateThisFrame = false;

            if (comicFilter != null)
            {
                comicFilter.Dispose();
            }
        }