avoid segfault produced when a dataset is gced and closed after teh driver manager has been destroyed