libenv/libenv.py
def close(self) -> None:
        """Close the environment and free any resources associated with it"""
        if not hasattr(self, "closed") or self.closed:
            return

        self.closed = True
        self._c_lib.libenv_close(self._c_env)
        with global_open_count_lock:
            global_open_count[self._lib_path] -= 1
            if global_open_count[self._lib_path] == 0:
                self._c_lib.libenv_unload()
            self._ffi.dlclose(self._c_lib)
        self._c_lib = None
        self._ffi = None
        self._options_keepalives = None
        if self.viewer is not None:
            self.viewer.close()
        self.close_extras()
Close the environment and free any resources associated with it
Close the environment and free any resources associated with it
Close the environment and free any resources associated with it
def close(self) -> None:
        if not hasattr(self, "closed") or self.closed:
            return
        self.closed = True
        self._c_lib.libenv_close(self._c_env)
        with global_open_count_lock:
            global_open_count[self._lib_path] -= 1
            if global_open_count[self._lib_path] == 0:
                self._c_lib.libenv_unload()
            self._ffi.dlclose(self._c_lib)
        self._c_lib = None
        self._ffi = None
        self._options_keepalives = None
        if self.viewer is not None:
            self.viewer.close()
        self.close_extras()
def close ( self ) -> None : if not hasattr ( self , "closed" ) or self . closed : return self . closed = True self . _c_lib . libenv_close ( self . _c_env ) with global_open_count_lock : global_open_count [ self . _lib_path ] -= 1 if global_open_count [ self . _lib_path ] == 0 : self . _c_lib . libenv_unload ( ) self . _ffi . dlclose ( self . _c_lib ) self . _c_lib = None self . _ffi = None self . _options_keepalives = None if self . viewer is not None : self . viewer . close ( ) self . close_extras ( )
Close the environment and free any resources associated with it
Close the environment and free any resources associated with it
"""Close the environment and free any resources associated with it"""
self