Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2004-05-27 22:56:03


"Edward Diener" <eddielee_at_[hidden]> writes:

> Brian Braatz wrote:
>> Hmm.. (spent some hours doing some more digging on this). I write a
>> managed app, yet my dtor is called.. ok, so this is not a question for
>> boost. I have not been able able to find anything in the MS docs as to
>> "why" RAII is working managed, this goes against everything I have
>> heard\understood.
>
> For a managed class your dtor is called when the object is garbage
> collected, since that is when it is destroyed. For an unmanaged class it is
> the normal case of the dtor being called immediately whenever the object is
> destroyed, either through a delete in dynamic memory or the object going out
> of scope in non-dynamic memory.
>
> There is nothing mysterious about this in .NET. The difference is that
> garbage collection is not deterministic destruction, and mya run at any
> time.

This is all completely OT for Boost. Please take it to an
appropriate forum.

Thanks,

-- 
Dave Abrahams
Boost Moderator

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk