Re: [SQLObject] bug: connection/transaction leak?
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Ian B. <ia...@co...> - 2003-12-19 21:04:59
|
> using the following while block: > > while 1: > ___ b = Account.new(name = "FOO" + str(time.time()), password = "bar", > connection = conn) > ___ print sys.getrefcount(conn) > ___ del(b) > > shows an increasing refcount of conn with every iteration. maybe the > leak > is somewhere in the sqlobject class? Each new Account is going to have a reference to the connection, so that's to be expected. Hmm... and the accounts won't be deleted because they are cached. That's the problem, then. Maybe the transaction simply needs to clear its cache on a commit/rollback (well, you can't really clear the cache, but you can make all the objects GCable). -- Ian Bicking | ia...@co... | http://blog.ianbicking.org |