Array<T>::nil_rep leaks memory
David Bateman
David.Bateman at motorola.com
Fri Sep 19 03:18:12 CDT 2008
Jaroslav Hajek wrote:
> Hi,
> in the function Array<T>::nil_rep a static pointer to an ArrayRep is
> declared and allocated via new. Unless I'm mistaken, such a pointer is
> never deleted and causes a memory leak. The attached patch fixes this
> by using a static variable instead and returning its address.
>
> best,
>
>
But nil_rep is only created once per Array<t> instantiation to represent
the empty matrix. It should only be cleared when Octave quits.. So
perhaps this isn't such a bug issue..
D.
--
David Bateman David.Bateman at motorola.com
Motorola Labs - Paris +33 1 69 35 48 04 (Ph)
Parc Les Algorithmes, Commune de St Aubin +33 6 72 01 06 33 (Mob)
91193 Gif-Sur-Yvette FRANCE +33 1 69 35 77 01 (Fax)
The information contained in this communication has been classified as:
[x] General Business Information
[ ] Motorola Internal Use Only
[ ] Motorola Confidential Proprietary
More information about the Octave-maintainers
mailing list