mono / CppSharp

Tools and libraries to glue C/C++ APIs to high-level languages
MIT License
3.14k stars 518 forks source link

Switch to sequential layouts in the C# end #666

Closed ddobrev closed 7 years ago

ddobrev commented 8 years ago

We should switch from explicit to sequential layouts because this way incorrect layouts - with holes or incorrect sizes - will crash immediately and thus there won't be any more hidden bugs. This depends on https://github.com/mono/CppSharp/issues/665 and https://bugzilla.xamarin.com/show_bug.cgi?id=33571 to be fixed first.

ddobrev commented 7 years ago

Because of alignments, packing and padding, sequential layouts pose a significant risk while offering doubtful, if any, benefits in performance. Closing as an invalid issue.