Closed Therzok closed 7 years ago
Also one thing to keep in mind - there are no guarantees about the contents of stackalloced memory. It looks like we always fully initialize all memory we allocate this way, but if you ever want allocate an extra byte for a null terminator (or whatever) do remember to explicitly write null to that byte!
The stackallocs are mostly GLib.Value/Utf8String via marshal, so it's safe to assume we don't get uninitialized memory.
https://github.com/mono/gtk-sharp/pull/207/commits/60c3220fe47acdaeefbda8e5e4aa77cda3701dca
Means: Faster allocation - not on the heap No more GValueArray wrapper on the heap - plus, no more finalization for it.