I don't think you should need to pin data. Pinning meant that the garbage collector would not compact your object, causing native pointer references to go awry. With WinRT, your class is a COM object, which is reference-counted, not garbage-collected. So the object lives on the native heap and will not be compacted/relocated.
Do i need to pin data when working with C# and C++/CX
سؤال
When sending data up and down the layers between C# and C++/CX, do i need to pin the data, before I was using the GCHandleType.Pinned
, do I still need it, or not as now I have migrated to C++/CX
? if so how should I do it ? the same way as before ?
Thanks !!
المحلول
لا تنتمي إلى StackOverflow