C# how can i pin an object in memory without marshalling the object?

后端 未结 1 1172
无人及你
无人及你 2020-12-16 01:11

Ok here it goes, i\'m using oracle\'s ContentAccess library in C#, the library is programmed in C.

I use some functions of the library to extract text from diffrent

相关标签:
1条回答
  • 2020-12-16 01:31

    In C#, there are two ways to pin an object in memory: the fixed statement and GCHandle.Alloc. In your case, I believe you want GCHandle.Alloc.

    See GCHandle.Alloc for a code example, and the fixed keyword documentation.

    0 讨论(0)
提交回复
热议问题