diff --git a/chromadb/api/client.py b/chromadb/api/client.py index c1564135de2..ea5adbde7b2 100644 --- a/chromadb/api/client.py +++ b/chromadb/api/client.py @@ -476,13 +476,6 @@ def close(self) -> None: # endregion - @override - def __del__(self) -> None: - # only enforce resource clean-up for ephemeral clients - expand to others? - if self._identifier == "ephemeral": - self.close() - super().__del__() - class AdminClient(SharedSystemClient, AdminAPI): _server: ServerAPI diff --git a/chromadb/test/test_client.py b/chromadb/test/test_client.py index 1456a7b4353..b5f90ccbddf 100644 --- a/chromadb/test/test_client.py +++ b/chromadb/test/test_client.py @@ -321,6 +321,7 @@ def test_delete_ephemeral_client() -> None: client = chromadb.EphemeralClient() coll = client.get_or_create_collection("test") coll.add(ids="1", documents="a", embeddings=[1] * 128) + client.close() del client client = chromadb.EphemeralClient()