Skip to content

Commit

Permalink
Clarify Cannot close object; library is destroyed condition
Browse files Browse the repository at this point in the history
  • Loading branch information
mara004 committed Jun 4, 2024
1 parent 0f4bba8 commit ff2ff4b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pypdfium2/internal/bases.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit ff2ff4b

Please sign in to comment.