public void GetNextDrawable()
        {
            if (!_drawable.IsNull)
            {
                ObjectiveCRuntime.release(_drawable.NativePtr);
            }

            using (NSAutoreleasePool.Begin())
            {
                _drawable = _metalLayer.nextDrawable();
                ObjectiveCRuntime.retain(_drawable.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.");
            }
        }