the listener for an event must have the following signature;
if the event is:
ofEvent<Type> event
the method must be:
void method(Type & parameter)
so you can’t pass the destructor to the event. Also it seems kind of weird to try to do that, if you need to destroy an object when something happens probably you want to register a class that contains the ones you want to destroy and register a method of that class with a certain parameter that tells it which object needs to be destroyed