Skip to content

Commit

Permalink
Update TROUBLESHOOT.md
Browse files Browse the repository at this point in the history
  • Loading branch information
polina-c committed Jul 11, 2023
1 parent f4fe7af commit 224e572
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion doc/TROUBLESHOOT.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ TODO: link DevTools documentation with explanation
## Verify object references

If you expect an object to be not referenced at some point,
but tot sure, you can validate it by temporary adding assertion:
but not sure, you can validate it by temporary adding assertion.

```
final ref = WeakReference(myObject);
Expand All @@ -81,6 +81,10 @@ if (ref.target == null) {
}
```

IMPORTANT: this code will not work in release mode, so
you need to run it with flag `--debug` or `--profile`, or,
if it is test, by clicking `Debug` near your test name in IDE.

## Known complicated cases

### 1. More than one closure context
Expand Down

0 comments on commit 224e572

Please sign in to comment.