bircni / get-size2

Determine the size in bytes an object occupies inside RAM.
MIT License
0 stars 0 forks source link

Fix incorrect heap size value for boxed slice #2

Closed bircni closed 3 weeks ago

bircni commented 3 weeks ago

Previously the GetSize impl for a boxed slice didn't have a bound on T, so get_size was being called on &T instead of T. This meant that the size of each element was always being calculated to the size of a reference. This change fixes that and adds a test.

Closes #1