As a best practice, many SDKs that have Client() classes that require close()ing also support Python's async context manager protocol, like the Azure Python SDKs. That way, developers can write "async with CopilotClient() as client" and then not worry about explicitly closing. You can add support by implementing aenter and aexit dunder methods.
My motivation for asking:
Using the Python SDK, I mistakenly neglected to call session.destroy()/client.stop() and managed to use up all of my Mac's memory when running evals (200 copilot server processes).