add __del__ to client.py
add __del__ to client.py

Cli_Create uses C++ new to allocate an object, so it cannot be garbage-collected by python
Calling Cli_Destroy in __del__ de-allocates the object on garbage collection of the client object

If the __init__ call fails before calling self.create() (eg. load_library() fails), self.pointer is False and may be passed to Cli_Destroy as this checks the pointer before deleting on it.
ellepdesk/python-snap7,ellepdesk/python-snap7