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

Benoît Minisini gambas at ...1...
Sun Mar 20 03:10:34 CET 2016


Le 20/03/2016 02:54, Ru Vuott a écrit :
> Yes, I know that does not represent the quantity of array contents.
>
>> Why do you care with that?
> To better understand via source code how Gambas's done.

You must do that by reading the interpreter source code.

This size is:
- The size of the inherited class.
- OR the size of the internal C structure depicting the object MINUS the 
size of the common object structure for classes written in C/C++.
- PLUS the size of the internal common event structure for objects 
raising events PLUS the number of events multiplied by two.
- PLUS the size of the dynamic variables for classes written in Gambas.

I don't know if Object.SizeOf() is actually useful. At least for an 
object written in Gambas, and not raising events, you get the size of 
the dynamic variables.

-- 
Benoît Minisini




More information about the User mailing list