cleaning up eventCreation memory management