How much memory is used by an object?

Jacob Carlborg doob at me.com
Mon Feb 18 07:39:47 PST 2013


On 2013-02-18 15:53, Alexandr Druzhinin wrote:

> I agree. But hidden member can't occupy so much memory that I disturb so
> much. I'm sure I use memory allocation in wrong manner but I haven't
> glue so far.
> Manual memory allocating is simpler for me than gc - I mean it's more
> explicit.

Some things to take into consideration:

* The GC will always allocate in chunks and may therefore use more than 
expected memory

* The GC will never give back memory to the OS which it has allocated

-- 
/Jacob Carlborg


More information about the Digitalmars-d-learn mailing list