Skip to content

Commit

Permalink
Update TROUBLESHOOT.md (#261)
Browse files Browse the repository at this point in the history
  • Loading branch information
polina-c authored Jan 23, 2025
1 parent a93ca0e commit f001108
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doc/leak_tracking/TROUBLESHOOT.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ switch to [more complicated troubleshooting](#more-complicated-cases).

Follow the rules to avoid/fix notGCed and notDisposed leaks:

1. **Ownership**. Every disposable object should have clear owner that manages its lifecycle.
1. **Ownership**. Every disposable object should have clear owner that manages its lifecycle. Normally, it it creator of the object. If it is different, the exception should be clearly documented.
2. **Disposal**. The owner should invoke the object's `dispose`.
3. **Release**. The owner should null reference to the disposed object, if its `dispose` happens earlier than owner's disposal.
4. **Weak referencing**. Non-owners should either link the object with WeakReference, or make sure to
Expand Down

0 comments on commit f001108

Please sign in to comment.