Get class size of object

Andrej Mitrovic andrej.mitrovich at gmail.com
Sun Aug 11 08:26:04 PDT 2013


On 8/11/13, JS <js.mdnq at gmail.com> wrote:
> Given an object, is there a built in way to get the size of the
> class the object represents?

Try:
import core.memory;
auto size = GC.sizeOf(object);


More information about the Digitalmars-d-learn mailing list