We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 83e268c commit a34b2b4Copy full SHA for a34b2b4
pygeodiff/geodifflib.py
@@ -80,12 +80,16 @@ def __init__(self, name):
80
self.check_version()
81
self._register_functions()
82
83
+ def __del__(self):
84
+ self.shutdown()
85
+
86
def shutdown(self):
- if platform.system() == "Windows":
- from _ctypes import FreeLibrary
87
+ if self.lib is not None:
88
+ if platform.system() == "Windows":
89
+ from _ctypes import FreeLibrary
90
- FreeLibrary(self.lib._handle)
- self.lib = None
91
+ FreeLibrary(self.lib._handle)
92
+ self.lib = None
93
94
def _register_functions(self):
95
self._readChangeset = self.lib.GEODIFF_readChangeset
0 commit comments