c# - Is Marshal.AllocHGlobal() result deterministic? -


let's have code:

intptr native_color = marshal.allochglobal (marshal.sizeof (typeof (gdk.rgba))); 

is memory of native_color initialized zeros? think yes, there of cases in i've detected not case... so, marshal.allochglobal() not deterministic?

from documentation marshal.allochglobal method (int32)

when allochglobal calls localalloc, passes lmem_fixed flag, causes allocated memory locked in place. also, allocated memory is not zero-filled.

if have seen memory returned marshal.allochglobal filled zeros, because there.


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -