Skip to content

Commit 8486acc

Browse files
authored
Merge pull request #263 from joshtriplett/c-dtor-clarify
C-DTOR: Clarify that `Drop` should ignore errors
2 parents b6c506d + c8bb675 commit 8486acc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/dependability.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@ destructor causes the program to abort.
8181

8282
Instead of failing in a destructor, provide a separate method for checking for
8383
clean teardown, e.g. a `close` method, that returns a `Result` to signal
84-
problems.
84+
problems. If that `close` method is not called, the `Drop` implementation
85+
should do the teardown and ignore or log/trace any errors it produces.
8586

8687

8788
<a id="c-dtor-block"></a>

0 commit comments

Comments
 (0)