[Gambas-user] Object.SizeOf(array) = 40

Benoît Minisini gambas at ...1...
Sun Mar 20 01:45:20 CET 2016


Le 20/03/2016 01:38, Ru Vuott a écrit :
> Hello......
>
> *********************************************
> Public Sub Main()
>
>    Dim bb As Byte[] = [1, 2, 3, 4]
>
>    Print Object.SizeOf(bb)
>
> End
> *********************************************
>
> Object.SizeOf() method return 40 byte.
>
> Why ?
>
> What is the source structure 40 bytes long?
>
> Maybe "GB_ARRAY_BASE" in "gambas.h" ?
>
> Regards
> vuott
>

It's not the size of the array contents, it's the size of the object in 
memory. Why do you care with that?

-- 
Benoît Minisini




More information about the User mailing list