What were variable GC handles used for? #86840
-
Specifically |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Yes, the variable GC handles were used for WinRT/COM interop in .NET Native for UWP for a period of time. They were alternative of ref-counted handles. Ref-counted handles require GC to call back into COM interop subsystem to find out whether the handle is strong or not. Variable handles flip the direction. COM interop had to update the handle type every time when the ref count dropped to zero or when the ref-count was bumped from zero to one. I do not recall the exact reason why we have abandoned them. The shipping NET Native for UWP does not use them anymore. |
Beta Was this translation helpful? Give feedback.
Yes, the variable GC handles were used for WinRT/COM interop in .NET Native for UWP for a period of time.
They were alternative of ref-counted handles. Ref-counted handles require GC to call back into COM interop subsystem to find out whether the handle is strong or not. Variable handles flip the direction. COM interop had to update the handle type every time when the ref count dropped to zero or when the ref-count was bumped from zero to one.
I do not recall the exact reason why we have abandoned them. The shipping NET Native for UWP does not use them anymore.