octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Compilation error: auto_ptr and private class


From: Michael Goffioul
Subject: Re: Compilation error: auto_ptr and private class
Date: Sat, 13 Feb 2010 10:07:44 +0000

On Sat, Feb 13, 2010 at 4:24 AM, Jaroslav Hajek <address@hidden> wrote:
> Nice, I overlooked this. Still it's a bug, IMHO, because the operators
> are public.
> So I suppose just removing the OCTAVE_ALLOCATOR decls and defines
> should work for you.
> Another option is to use idx_vector instead of auto_ptr to hold the
> pointer - this should also prevent a leak. But idx_vector has no
> release() so you'll need to explicitly increment the counter prior to
> returning, and it does not have the -> operator overload, so you'll
> need to reference the rep member. I see auto_ptr was really the best
> tool here.

See the proposed solution from WayneAKing in
http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/6cd70115-5b7b-47c8-a0cd-5a6f2d755784/#8149b96d-b36a-4f4c-a30e-4187d3237d73
Would that be acceptable?

At least it's easier for me to add in my MSVC patch.

Michael.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]