Bug#151489: python-apt: pkgCache objects never get freed
Package: python-apt
Version: 0.5.4.3
Severity: normal
The following code gives you an ever growing python process:
import apt_pkg
apt_pkg.InitConfig()
apt_pkg.InitSystem()
while 1:
cache = apt_pkg.GetCache()
I am not sure if it is python-apt's or libapt's problem, and since
usually you only load the cache once before quiting it is generaly not
a big problem.
I am rewritting apt-proxy and using python-apt is very handy, but since
apt-proxy is a daemon the above is really a problem.
My first guess was that since it uses CppOwnedDealloc<pkgCache *> to
deallocate the object, it just deallocates de pointer to the object and
not the object itself. But putting this on its place didn't fix it:
static void CppOwnedDealloc_pkgCache(PyObject *iObj)
{
pkgCache *Cache = GetCpp<pkgCache *>(iObj);
delete Cache;
CppOwnedDealloc<pkgCache *>(iObj);
}
I am willing to fix it myself, but I would at least need some pointers
from more knowledgeable people.
Thank for a great job
ranty
-- System Information
Debian Release: 3.0
Architecture: i386
Kernel: Linux hell 2.4.18-ac3 #4 Fri Apr 26 11:17:02 CEST 2002 i686
Locale: LANG=C, LC_CTYPE=es_ES
Versions of packages python-apt depends on:
ii apt [libapt-pkg-libc6.2-3-2-3 0.5.4 Advanced front-end for dpkg
ii apt-utils [libapt-inst-libc6. 0.5.4 APT utility programs
ii libc6 2.2.5-7 GNU C Library: Shared libraries an
ii python 2.1.3-3 An interactive object-oriented scr
-- no debconf information
--
To UNSUBSCRIBE, email to deity-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Reply to: