octave-maintainers
[Top][All Lists]
Advanced

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

Re: rc/ov.h:166: warning: 'octave_value::rep' should be initialized in t


From: Jordi Gutiérrez Hermoso
Subject: Re: rc/ov.h:166: warning: 'octave_value::rep' should be initialized in the member initialization list
Date: Fri, 14 Jan 2011 13:32:16 -0600

On 14 January 2011 13:14, John W. Eaton <address@hidden> wrote:
> Note that the octave_base_value constructor sets the count to 1, so by
> incrementing it here, we ensure that this object can never be deleted,
> so it should be safe to use the static member instead of allocating it
> with new.

It's never safe to use delete without new. If this has been working so
far, it's a peculiarity of gcc, which might break in other compilers
or in future versions of gcc. Pascal is correct in asking about this
error.

- Jordi G. H.


reply via email to

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