On Tuesday 30 May 2006 17:41, Simon Cross wrote:
> > I think you misread my example. The test script I attached
> > creates a database object and immediately destroys it with
> > o.destroySelf() so the net result should be zero because the
> > object is removed from both the database and the sqlobject
> > cache when it's destroyed.
>
> My bad.
>
> However, the reason the objects aren't being freed in your example
> code is that you tell the garbage collector not to with
> gc.set_debug(gc.DEBUG_LEAK) which also sets DEBUG_SAVEALL.

I know that. But that is just to highlight the problem and make it 
obvious. Without that it's hidden by the gc. It's just a test script to 
show the issue, not a part of any real application.

> Note that I have personally used SQLObject 0.7.0 to insert millions of
> objects into a MySQL database and had the garbage collector
> automatically work for me, which is why I'm fairly confident that your
> issue goes a bit deeper than a simple set of cyclic references.

I have no deep issue really. Just a patch to clean up 2 cyclic references.
I know very well that if I disable the leak debugging, the memory usage 
will stay still, but take my test script for what it really is: a simple 
script to highlight the issue, not an application with problems.

So, are you suggesting that since the garbage collector does the job of 
finding them, we shouldn't bother to remove some cyclic references we 
know about and avoid some unnecessary garbage collecting?

-- 
Dan


-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to