February 24, 2003
Hi,

is it true that in D the min. memory consumption of an object is equal to a dynamic int-array (8 byte)?

H.C.



February 24, 2003
Hans Castorp wrote:
> is it true that in D the min. memory consumption of an object is equal to a
> dynamic int-array (8 byte)?

There's a correlation, but they have nothing to do with one another. The minimum size of a class instance is caused by the vtable pointer and a monitor used with the synchronized statement.  struct values, however, have no hidden fields.