public override void Dispose()
 {
     if (_drawable.NativePtr != IntPtr.Zero)
     {
         ObjectiveCRuntime.objc_msgSend(_drawable.NativePtr, "release");
     }
     _framebuffer.Dispose();
     ObjectiveCRuntime.release(_metalLayer.NativePtr);
 }
Exemple #2
0
        public void GetNextDrawable()
        {
            if (_drawable.NativePtr != IntPtr.Zero)
            {
                ObjectiveCRuntime.objc_msgSend(_drawable.NativePtr, "release");
            }

            _drawable = _layer.nextDrawable();
            if (_drawable.NativePtr == IntPtr.Zero)
            {
                Console.WriteLine("Got a null drawable.");
            }
        }