Array of ids, or a new class

For questions and postings not covered by the other forums
ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Array of ids, or a new class

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:13 pm

by pillick >> Thu, 5 Sep 2002 21:42:34 GMT

What takes up the least space out of:

A Demimal of legnth 7
A pointer to an object (which has only one attribute - the decimal value)

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Array of ids, or a new class

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:13 pm

by allistar >> Thu, 5 Sep 2002 22:16:03 GMT

The reference to the object will take up less space, although the
object itself will take up a lot more space that just a Decimal
property by itself.

A decimal takes up 3-12 bytes depending on the precision (aligned to
the nearest octet).
A shared object reference takes up 6 bytes.
An object has a fixed header part of 41 bytes, and also has a trailer part that takes up space as well.

(From page 313 of the devref.pdf file).

Allistar.

------------------------------------------------------------------
Allistar Melville
Software Developer
Auckland, NEW ZEALAND

Greentree International,
Developer of Greentree Financial Software. ------------------------------------------------------------------


Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 26 guests