[Sugar-devel] Memory leak in Sugar -- how to dump Py data structures?
Tomeu Vizoso
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 [1]. It cites a tool that creates an object
> graph that visually represents what is happening in memory.[2]
>
> [1] http://www.lshift.net/blog/2008/11/14/tracing-python-memory-leaks
> [2] 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.
Regards,
Tomeu
> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
>
>
More information about the Sugar-devel
mailing list