dynamic allocation of event objects using vector of pointers