[Sugar-devel] Memory leak in Sugar -- how to dump Py data structures?
tomeu at sugarlabs.org
Fri Oct 8 03:50:29 EDT 2010
On Thu, Oct 7, 2010 at 22:01, Tim McNamara <paperless at timmcnamara.co.nz> wrote:
> On 8 October 2010 03:34, Martin Langhoff <martin.langhoff at gmail.com> wrote:
>> See http://dev.laptop.org/ticket/10386 for details. The sugar-session
>> process in 10.1.2 grows slowly...
>> There's some form of leak somewhere. Maybe we are triggerin a real
>> python leak, maybe we have reference loops. How do we trace this?
> This post seems pretty good . It cites a tool that creates an object
> graph that visually represents what is happening in memory.
>  http://www.lshift.net/blog/2008/11/14/tracing-python-memory-leaks
>  http://mg.pov.lt/blog/python-object-graphs.html
Those are good links, in this case I suspect those icons, or any other
object referenced inside a cycle that also contains an AP icon, are
listening for a signal in a longer-lived object, which prevents the
whole cycle to be freed. We need to either disconnect from that signal
when the icon is no longer needed, or use a weak reference.
I will be looking at a similar issue in the next few days but in 0.90,
I will know by then.
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
More information about the Devel