[Matrix-SIG] NetCDF memory leak

Konrad Hinsen hinsen@cnrs-orleans.fr
Thu, 17 Jun 1999 15:43:17 +0200


After looking again at the netCDF interface code with respect to
circular reference, I settled for a minimal solution that has the
advantage of not changing the externally visible behaviour at all:
when a file is closed, the references from the variable objects to the
file objects are removed. However, the variable objects will still be
in the variable dictionary of the file object. This means that no
variable object will be deallocated before the file object is
deallocated. And of course no object will be deallocated as long as
there are references to it in user code. So if you use many netCDF
files, make sure that no references to files are kept after they are
closed.

The fixed version will be in the next alpha release of Scientific Python
(2.0a6), available later today or tomorrow on my FTP server
(ftp://dirac.cnrs-orleans.fr).
-- 
-------------------------------------------------------------------------------
Konrad Hinsen                            | E-Mail: hinsen@cnrs-orleans.fr
Centre de Biophysique Moleculaire (CNRS) | Tel.: +33-2.38.25.55.69
Rue Charles Sadron                       | Fax:  +33-2.38.63.15.17
45071 Orleans Cedex 2                    | Deutsch/Esperanto/English/
France                                   | Nederlands/Francais
-------------------------------------------------------------------------------