octave-maintainers
[Top][All Lists]
Advanced

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

Re: Array<T>::nil_rep leaks memory


From: David Bateman
Subject: Re: Array<T>::nil_rep leaks memory
Date: Fri, 19 Sep 2008 10:18:12 +0200
User-agent: Thunderbird 2.0.0.16 (X11/20080725)

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                                address@hidden
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



reply via email to

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