Cleaning up a memory leak in SwithBehaviorEvent