[ACCEPTED]-C# how can i pin an object in memory without marshalling the object?-pinvoke
Accepted answer
In C#, there are two ways to pin an object 3 in memory: the fixed
statement and GCHandle.Alloc
. In your 2 case, I believe you want GCHandle.Alloc
.
See GCHandle.Alloc for a code 1 example, and the fixed keyword documentation.
Source:
stackoverflow.com
More Related questions
Cookie Warning
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.