From ff2ff4bd519e9b44bfe3182cff052d893bd442e0 Mon Sep 17 00:00:00 2001 From: geisserml Date: Tue, 4 Jun 2024 18:24:50 +0200 Subject: [PATCH] Clarify `Cannot close object; library is destroyed` condition CC https://github.com/mindee/doctr/pull/1624 --- src/pypdfium2/internal/bases.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pypdfium2/internal/bases.py b/src/pypdfium2/internal/bases.py index 010e11112..af34c30a0 100644 --- a/src/pypdfium2/internal/bases.py +++ b/src/pypdfium2/internal/bases.py @@ -37,7 +37,7 @@ def _close_template(close_func, raw, obj_repr, state, parent, *args, **kwargs): os.write(sys.stderr.fileno(), f"Close ({desc}) {obj_repr}\n".encode()) if not LIBRARY_AVAILABLE: - os.write(sys.stderr.fileno(), f"-> Cannot close object, library is destroyed. This may cause a memory leak!\n".encode()) + os.write(sys.stderr.fileno(), f"-> Cannot close object; library is destroyed. This may happen on process exit, but should not during runtime.\n".encode()) return assert (parent is None) or not parent._tree_closed()