Skip to content

Commit e4633e0

Browse files
authored
add note about references in Out (#49729)
1 parent e3e5eaa commit e4633e0

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

stdlib/REPL/docs/src/index.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -646,6 +646,13 @@ Out[3]: Dict{Int64, Any} with 2 entries:
646646
1 => 8
647647
```
648648

649+
!!! note
650+
Since all outputs from previous REPL evaluations are saved in the `Out` variable, one should be careful if they are returning many
651+
large in-memory objects like arrays, since they will be protected from garbage collection so long as a reference to them remains in
652+
`Out`. If you need to remove references to objects in `Out`, you can clear the entire history it stores with `empty!(Out)`, or clear
653+
an individual entry with `Out[n] = nothing`.
654+
655+
649656
## TerminalMenus
650657

651658
TerminalMenus is a submodule of the Julia REPL and enables small, low-profile interactive menus in the terminal.

0 commit comments

Comments
 (0)