SizeOf returns 0 for :Object variables

Archives Forums/BlitzMax Bug Reports/SizeOf returns 0 for :Object variables

Mr. Goober(Posted 2015) [#1]
When trying to find the size of an object when the variable holding the data is casted as :Object, using SizeOf will return 0 regardless.
global a :string = "Test 1"
print sizeof(a) ' Returns 12
global b :object = a
print sizeof(b) ' returns 0


Not sure if this is intended behavior. It's assumed that :Object types don't hold the data themselves. Since :String is a derived type of :Object, it might be that :String is holding the character data in its type definition, causing SizeOf to return 0 when used on an :Object casted variable.