# \[Pitch\] Cell, ConstCell, and Volatile

**URL:** <https://forums.swift.org/t/pitch-cell-constcell-and-volatile/89582>\
**Category:** Pitches\
**Created:** [September 15, 2026, 7:18pm UTC](https://forums.swift.org/t/pitch-cell-constcell-and-volatile/89582 "2026-09-15T19:18:08Z")\
**Posts on this page:** 1\
**Showing post:** 19

<div class="post-metadata">

**Author:** ![sebastian-vohn](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/sebastian-vohn/32/38929_2.png) [@sebastian-vohn](https://forums.swift.org/u/sebastian-vohn)\
**Post date:** [September 24, 2026, 3:29am UTC](https://forums.swift.org/t/pitch-cell-constcell-and-volatile/89582/19 "2026-09-24T03:29:19Z")

</div>

In addition to enabling interior mutability, the existing `_Cell` type in the standard library guarantees [address stability](https://forums.swift.org/t/implementation-details-of-new-mutex-type/71942/5) until the value (or rather, an owning binding of that value) is consumed. Having stable addresses is important for certain C interoperability scenarios, where a called C function (temporarily) escapes a passed pointer out of its body; for instance, if a C function registers an event callback with the pointer as context argument.

Will the pitched `Cell` and `ConstCell` types guarantee address stability like `_Cell` does today? That is, can the pointer passed to the `body` of their `withUnsafe{…}Pointer` methods be safely escaped and used until the original owning binding of the cell is consumed? In that case, would it make sense to directly expose the pointer as a property, similar to `_Cell`, since escaping a pointer from a with-style closure is normally an unsafe anti-pattern?

---

_[View the full topic](https://forums.swift.org/t/pitch-cell-constcell-and-volatile/89582)._
