Okey so I have found the Class instance that was holding onto the data. I
can now save my image after a parsing without tripling its size.

But the VM's memory footprint (according to Windows task manager) does not
falls back to normal after a parse. My guess is that now that the VM was
allocated more space, it juste doesn't give it back. It still bugs me a
little since I can see the memory occupied by the VM drop when minimised in
the task bar.


> If you want to use a huge data structure, you have to think carefully
> about your representations. There are tricks you can use to conserve
> memory: use more primitive types (SmallIntegers, bit flags, Symbols), use
> shared instances, use alternatives like ZTimestamp which is half the size
> of DateAndTime, or use your own integer time, sparse data structures, and
> so on - and you can hide these optimisations behind your standard API.
>

I have a quick question regarding primitive type:

1 sizeInMemory -> 0
1.0 sizeInMemory -> 12

I do use a integer as my timestamp, encapsulated in a class, which also
weight 12 bytes. This makes me think that the a Float weighting 12 bytes is
an encapsulation of a primitive type I don't know of. If so, is it possible
to not use a Float, but something like a double ?

Thomas.

Reply via email to