AxelS:
>       void[] dat=new void[50_000_000]; // allocate 50 MByte of dummy-data

I am not sure, but the GC may scan that chunk of voids. If you need a raw block 
it may be better to work with an array of uint.


> Why can't the GC remove that data and how CAN I remove it?

If you really need to remove it, then you may not allocate it from the GC heap 
in the first place, and use the C heap, with a malloc and then free. But that 
requires a full manual management, and for safety it's then usually much better 
to put in such memory chunk only data that doesn't contain references managed 
by GC.

Bye,
bearophile

Reply via email to