add to Unsafe.SkipInit
, support for ref struct
items
#7581
Answered
by
huoyaoyuan
irvnriir
asked this question in
Language Ideas
-
due to that |
Beta Was this translation helpful? Give feedback.
Answered by
huoyaoyuan
Oct 7, 2023
Replies: 1 comment 11 replies
-
Generic parameter support for ref struct is #1148. |
Beta Was this translation helpful? Give feedback.
11 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Unsafe.SkipInit
is not known by the language. It is just a runtime-provided helper. Without generic parameter support, such helper can't be defined for ref structs.Ref fields and reference type fields must be initialized to null since GC can't handle wild references.