Skip to content

Commit 0385ae1

Browse files
committed
tutorial: Emphasize GC in shared box section
1 parent 95f6e52 commit 0385ae1

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

doc/tutorial.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1266,13 +1266,7 @@ All pointer types can be dereferenced with the `*` unary operator.
12661266
12671267
## Shared boxes
12681268
1269-
Shared boxes are pointers to heap-allocated, reference counted memory.
1270-
A cycle collector ensures that circular references do not result in
1271-
memory leaks.
1272-
1273-
> ***Note:*** We will in the future switch to garbage collection,
1274-
> rather than reference counting, for shared boxes.
1275-
1269+
Shared boxes are pointers to heap-allocated, garbage collected memory.
12761270
Creating a shared box is done by simply applying the unary `@`
12771271
operator to an expression. The result of the expression will be boxed,
12781272
resulting in a box of the right type. Copying a shared box, as happens
@@ -1287,6 +1281,10 @@ let y = x; // Copy the pointer, increase refcount
12871281
12881282
Shared boxes never cross task boundaries.
12891283
1284+
> ***Note:*** shared boxes are currently reclaimed through reference
1285+
> counting and cycle collection, but we will switch to a tracing
1286+
> garbage collector.
1287+
12901288
## Unique boxes
12911289
12921290
In contrast to shared boxes, unique boxes have a single owner and thus

0 commit comments

Comments
 (0)