Invoke garbage collector?

spir denis.spir at gmail.com
Thu Feb 10 04:34:53 PST 2011


On 02/09/2011 10:15 PM, Steven Schveighoffer wrote:
> On Wed, 09 Feb 2011 15:58:13 -0500, bearophile <bearophileHUGS at lycos.com> wrote:
>
>> Sean Eskapp:
>>
>>> so is there a way to invoke a GC cleanup in some way?
>>
>> http://www.digitalmars.com/d/2.0/phobos/core_memory.html#minimize
>
> This attempts to minimize memory, it does not run a collection cycle (I don't
> think anyways). To invoke the GC collector, use:
>
> http://www.digitalmars.com/d/2.0/phobos/core_memory.html#collect
>
> -Steve

But won't this blindly run a GC cycle? What if all I want is a given thingy's 
mem to be released, isn't it overkill to call GC.collect?

Denis
-- 
_________________
vita es estrany
spir.wikidot.com



More information about the Digitalmars-d-learn mailing list