fix memory leak in splitdetector