Re: A malloc error in C++
Re: A malloc error in C++
- Subject: Re: A malloc error in C++
- From: "Shawn Erickson" <email@hidden>
- Date: Wed, 29 Aug 2007 08:07:06 -0700
On 8/29/07, Shawn Erickson <email@hidden> wrote:
> On 8/29/07, Clark Cox <email@hidden> wrote:
>
> > Here's your problem. Why are you trying to call the destructor directly?
> >
> > ...
> > > zAnalysis.~DataAnalysis();
>
> Giacomo consider doing the following since you are using stack
> allocated objects... wrapping them in blocks will scope the life time
> of stack allocated objects in that block (of course the compiler would
> like see this for itself and may terminate the life times early).
>
> {
> GMNLFS::DataAnalysis<vector<double>::iterator,double>
> zAnalysis(z.begin(),z.end());
> ...
> }
>
> {
> GMNLFS::DataAnalysis<vector<double>::iterator,double>
> mvAnalysis(mv.begin(),mv.end());
> ...
> }
...oops I meant to cut out the calls to the destructor.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden