Timeline for Understanding GCHandle.Alloc pinning in C#
Current License: CC BY-SA 4.0
7 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Feb 12 at 20:43 | history | edited | Remy Lebeau | CC BY-SA 4.0 |
added 12 characters in body
|
Jan 11, 2023 at 14:25 | history | edited | IS4 | CC BY-SA 4.0 |
added 93 characters in body
|
Aug 10, 2017 at 19:32 | vote | accept | IamIC | ||
Aug 10, 2017 at 19:31 | comment | added | IamIC | I figured there was something different happening to what the code explicitly states. The outcome is fine, but it's a little disappointing how it's achieved. | |
Aug 10, 2017 at 19:28 | comment | added | IS4 | @IamIC Yes, it has to pin the whole instance. CLR is clever enough to determine the whole object from an address of its field. | |
Aug 10, 2017 at 19:06 | comment | added | IamIC |
Thanks much! So, when I am pinning (via fixed ) the BufItems Items field, then .Net is actually pinning wrap ? As you said, the struct is a value type.
|
|
Aug 10, 2017 at 18:46 | history | answered | IS4 | CC BY-SA 3.0 |