[Urwid] Bug: Signal module create backreferences
dom.lobue at gmail.com
Mon Mar 8 05:15:52 EST 2010
On Sat, Mar 6, 2010 at 11:50 AM, Ian Ward <ian at excess.org> wrote:
> Dominic LoBue wrote:
>> I have a working implementation. By no means is it elegant, but it works.
>> Basically instead of holding onto the specific method that is to be
>> called when a signal is recieved, we instead hold onto a tuple of
>> (ref(parentwithmethod), 'methodname'). When the signal is activated,
>> we use getattr to get an instance of the method we want and then run
>> that method.
>> Working examples can be found here:
> That's great, sounds like you're close to a good solution,
> Why don't you fork urwid on github so I can see the changes a little
> more easily?
> Urwid mailing list
> Urwid at lists.excess.org
I wasn't sure whether it was better to use duck typing or explicit
type checking (in case there might be more edge-cases that cause
memory leaks), so I create a branch for both:
While my app still uses a ton of memory, this fix has helped a ton.
More information about the Urwid