# HG changeset patch # User Matthew Wild # Date 1430935276 -3600 # Node ID 22a7ee3379bc870223dc4d57a9171f4fb37b5ef1 # Parent 8241eac507c326e0d55cce0ef7b2fdd2db168b7e moduleapi: Clear self.event_handlers when unhooking an event, to prevent leaks diff -r 8241eac507c3 -r 22a7ee3379bc core/moduleapi.lua --- a/core/moduleapi.lua Wed May 06 19:00:05 2015 +0100 +++ b/core/moduleapi.lua Wed May 06 19:01:16 2015 +0100 @@ -94,6 +94,7 @@ end function api:unhook_object_event(object, event, handler) + self.event_handlers:set(object, event, handler, nil); return object.remove_handler(event, handler); end