protected override void DisposeManaged()
 {
     if (uniquePtrHandle != null)
     {
         uniquePtrHandle.Dispose();
         uniquePtrHandle = null;
     }
     base.DisposeManaged();
 }
 public EglSurfaceHolder(IntPtr ptr, bool isOwner = true) : base(isOwner)
 {
     uniquePtrHandle = new UniquePtr(ptr, isOwner);
     this.ptr        = uniquePtrHandle.Get();
 }
 public EglSurfaceHolder() : base()
 {
     UnsafeNativeMethods.mp_EglSurfaceHolderUniquePtr__(out var uniquePtr).Assert();
     uniquePtrHandle = new UniquePtr(uniquePtr);
     this.ptr        = uniquePtrHandle.Get();
 }