Fixed memory leak in __triggerMessageEvent.