fix memory issue in mixer::close