RE: [boost] Re: [prereview request][fsm]

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. """""""""""""""""" -----Original Message----- From: Gregory Colvin [mailto:gregory.colvin@oracle.com] Sent: Wednesday, May 26, 2004 6:02 PM To: boost@lists.boost.org 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? """"""""""""""""""

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.
"""""""""""""""""" -----Original Message----- From: Gregory Colvin [mailto:gregory.colvin@oracle.com] Sent: Wednesday, May 26, 2004 6:02 PM To: boost@lists.boost.org 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: http://lists.boost.org/mailman/listinfo.cgi/boost

"Edward Diener" <eddielee@tropicsoft.com> 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
participants (3)
-
Brian Braatz
-
David Abrahams
-
Edward Diener