Fix invalid memory access in datamanager_cleanup()
This branch fixes an invalid memory access if an exception is thrown inside the constructor body of DataManager.
This branch fixes an invalid memory access if an exception is thrown inside the constructor body of DataManager.