zivid-python
zivid-python copied to clipboard
Common way of adding context manager + release to classes
__enter__, __exit__, __del__ and release are duplicated in many of the classes in modules/zivid
This could be fixed by adding, for example, and decorator:
@utils.context_manager
class SomethingThatRequiresContextManager:
....