Re: Bug in C++ /CLI 2005
- From: "Ben Voigt [C++ MVP]" <rbv@xxxxxxxxxxxxx>
- Date: Thu, 9 Oct 2008 08:33:21 -0500
Mark Salsbery [MVP] wrote:
"Howard Swope" <howard_swopeAThms3DOTcom> wrote in message
news:Oyv$tJgJJHA.1308@xxxxxxxxxxxxxxxxxxxxxxx
Declaring variables with stack semantics is one of the Advertised
features in C++ CLI
Not member variables.
It makes no sense to have member variables with stack semantics -
there's no "stack" involved unless you have an actual object.
I definitely do NOT agree with this. Stack semantics give you all the
correct calls to Dispose in all the corner cases, like exceptions thrown in
constructor initializer lists, automatically. Stack semantics is perhaps
not the best description -- scoped variable lifetime (vs dynamic lifetime)
might be better.
.
- Follow-Ups:
- Re: Bug in C++ /CLI 2005
- From: Mark Salsbery [MVP]
- Re: Bug in C++ /CLI 2005
- References:
- Bug in C++ /CLI 2005
- From: Howard Swope
- Re: Bug in C++ /CLI 2005
- From: Mark Salsbery [MVP]
- Bug in C++ /CLI 2005
- Prev by Date: Re: porting from C++Builder
- Next by Date: Re: Bug in C++ /CLI 2005
- Previous by thread: Re: Bug in C++ /CLI 2005
- Next by thread: Re: Bug in C++ /CLI 2005
- Index(es):
Relevant Pages
|