Updated destroy logic for closeable singletons.