Disable copying for EventManager.
Fix dubious use of malloc.