[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Array<T>::nil_rep leaks memory
From: |
Jaroslav Hajek |
Subject: |
Array<T>::nil_rep leaks memory |
Date: |
Fri, 19 Sep 2008 10:09:33 +0200 |
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,
--
RNDr. Jaroslav Hajek
computing expert
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz
nil_rep.diff
Description: Text Data
- Array<T>::nil_rep leaks memory,
Jaroslav Hajek <=