Ensure drop to avoid memory leaks