This actually had a very nice side effect. I've had problems all along
with SQLite tables and the error "Could not open database" when running
queries for no apparent reason. By only having one cursor on each
database this problem is also gone (at least it seems that way).


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Ed Leafe
Sent: 3. oktober 2006 17:45
To: Dabo Users list
Subject: Re: [dabo-users] Memory leak in dCursor?

On Oct 3, 2006, at 11:42 AM, Simen Haugen wrote:

> I thought that once a cursor went out of scope, it would be collected
> (or when the gc kicks in. I also tried to run the gc manually, but  
> they
> still didn't get collected). I could of course change my  
> get_connection
> function to return an old cursor instead of creating a new one each
> time.
>
> With the test you provided there are no leaks.

        OK, so then this sounds like a combination of Python needing to
GC  
better, and the app not creating multiple cursors when they aren't  
needed. BTW, why do you need multiple cursor objects?

-- Ed Leafe
-- http://leafe.com
-- http://dabodev.com



_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users



_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users

Reply via email to