Release resources. Note it is not safe to call this method from __del__ or any GC hooks.
(self)
| 343 | return encode(doc) |
| 344 | |
| 345 | def close(self) -> None: |
| 346 | """Release resources. |
| 347 | |
| 348 | Note it is not safe to call this method from __del__ or any GC hooks. |
| 349 | """ |
| 350 | self.client_ref = None |
| 351 | self.key_vault_coll = None |
| 352 | if self.mongocryptd_client: |
| 353 | self.mongocryptd_client.close() |
| 354 | self.mongocryptd_client = None |
| 355 | |
| 356 | |
| 357 | class RewrapManyDataKeyResult: |