CurtHagenlocher commented on code in PR #931:
URL: https://github.com/apache/arrow-adbc/pull/931#discussion_r1272531317


##########
csharp/src/Apache.Arrow.Adbc/C/NativeDelegate.cs:
##########
@@ -20,22 +20,15 @@
 
 namespace Apache.Arrow.Adbc.C
 {
-    internal readonly struct NativeDelegate<T>
+    internal readonly struct NativeDelegate<T> where T : Delegate
     {
         private readonly T _managedDelegate; // For lifetime management
-        private readonly IntPtr _nativePointer;
 
         public NativeDelegate(T managedDelegate)
         {
             _managedDelegate = managedDelegate;
-            _nativePointer = 
Marshal.GetFunctionPointerForDelegate<T>(managedDelegate);
         }
 
-        public static implicit operator IntPtr(NativeDelegate<T> thunk)
-        {
-            return thunk._nativePointer;
-        }
-
-        public IntPtr Pointer { get { return _nativePointer; } }
+        public IntPtr Pointer { get; }

Review Comment:
   Hmm... not sure what this says about our testing having passed :/. But yes, 
it looks like I did a poor job copying over from the changed version in the 
Arrow repo.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to