diff options
author | Arch Librarian <arch@canonical.com> | 2004-09-20 16:54:11 +0000 |
---|---|---|
committer | Arch Librarian <arch@canonical.com> | 2004-09-20 16:54:11 +0000 |
commit | 29f7b36cd63f16ceab825531b5c131eac4b99f9b (patch) | |
tree | 178ade1647b9c367bda22bbb721c329766cc675e | |
parent | ca17762a741f8ca967e5021073837ce5463b1e92 (diff) |
Fixed a small memory leak
Author: jgg
Date: 1999-07-03 06:45:40 GMT
Fixed a small memory leak
-rw-r--r-- | apt-pkg/tagfile.cc | 10 | ||||
-rw-r--r-- | apt-pkg/tagfile.h | 5 |
2 files changed, 12 insertions, 3 deletions
diff --git a/apt-pkg/tagfile.cc b/apt-pkg/tagfile.cc index 53e1e5e8b..97e5c244a 100644 --- a/apt-pkg/tagfile.cc +++ b/apt-pkg/tagfile.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: tagfile.cc,v 1.24 1999/02/22 03:30:06 jgg Exp $ +// $Id: tagfile.cc,v 1.25 1999/07/03 06:45:40 jgg Exp $ /* ###################################################################### Fast scanner for RFC-822 type header information @@ -35,6 +35,14 @@ pkgTagFile::pkgTagFile(FileFd &Fd,unsigned long Size) : Fd(Fd), Size(Size) Fill(); } /*}}}*/ +// pkgTagFile::~pkgTagFile - Destructor /*{{{*/ +// --------------------------------------------------------------------- +/* */ +pkgTagFile::~pkgTagFile() +{ + delete [] Buffer; +} + /*}}}*/ // TagFile::Step - Advance to the next section /*{{{*/ // --------------------------------------------------------------------- /* If the Section Scanner fails we refill the buffer and try again. */ diff --git a/apt-pkg/tagfile.h b/apt-pkg/tagfile.h index 82c856f8d..84998629d 100644 --- a/apt-pkg/tagfile.h +++ b/apt-pkg/tagfile.h @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: tagfile.h,v 1.13 1998/12/14 02:23:47 jgg Exp $ +// $Id: tagfile.h,v 1.14 1999/07/03 06:45:40 jgg Exp $ /* ###################################################################### Fast scanner for RFC-822 type header information @@ -81,8 +81,9 @@ class pkgTagFile bool Step(pkgTagSection &Section); inline unsigned long Offset() {return iOffset;}; bool Jump(pkgTagSection &Tag,unsigned long Offset); - + pkgTagFile(FileFd &F,unsigned long Size = 32*1024); + ~pkgTagFile(); }; #endif |