Boost logo

Boost :

From: Edward Diener (eddielee_at_[hidden])
Date: 2004-05-27 18:32:18

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

> """"""""""""""""""
> -----Original Message-----
> From: Gregory Colvin [mailto:gregory.colvin_at_[hidden]]
> Sent: Wednesday, May 26, 2004 6:02 PM
> To: boost_at_[hidden]
> Subject: Re: [boost] Re: [prereview request][fsm]
> If RAII is broken by "Managed C++" then "Managed C++" is broken.
> On May 26, 2004, at 6:22 PM, Brian Braatz wrote:
>> (My own post got me thinking some more). I am new to boost, and do
>> not fully have my head around all that exists. But I am asking a
>> general question here, has anyone tried running boost under "Managed
>> C++", I assume there is a lot of RAII type of usage in boost that I
>> assume would
>> break. Or am I misunderstanding something?
> """"""""""""""""""
> _______________________________________________
> Unsubscribe & other changes:

Boost list run by bdawes at, gregod at, cpdaniel at, john at