memory - Stackalloc Pointer to Pointer in C# -
i have structue in c#:
[structlayout(layoutkind.sequential)] public unsafe struct svm_node { internal int index; internal double value; }
and wrote below code allocate unmanaged memory variable p
svm_node** p = stackalloc svm_node*[100];
but after executing code variable p null, if use code:
svm_node* p = stackalloc svm_node[100];
p real pointer. problem?
Comments
Post a Comment