Skip to content

What were variable GC handles used for? #86840

Answered by jkotas
AustinWise asked this question in Q&A
Discussion options

You must be logged in to vote

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.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by AustinWise
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants