File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -1266,13 +1266,7 @@ All pointer types can be dereferenced with the `*` unary operator.
1266
1266
1267
1267
## Shared boxes
1268
1268
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.
1276
1270
Creating a shared box is done by simply applying the unary `@`
1277
1271
operator to an expression. The result of the expression will be boxed,
1278
1272
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
1287
1281
1288
1282
Shared boxes never cross task boundaries.
1289
1283
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
+
1290
1288
## Unique boxes
1291
1289
1292
1290
In contrast to shared boxes, unique boxes have a single owner and thus
You can’t perform that action at this time.
0 commit comments