It may be possible to use an atomic counter to track how many copies of an IStr currently exist, allowing the interner to recover memory when all copies have been dropped.
- Would have to remove
Copy, since Clone impl would increment said counter.
- Would have to change
IStr::as_str and IStr::as_c_str methods to return non-'static references, since they could no-longer out-live the IStr (without some other way to first permanently-leak it)
It may be possible to use an atomic counter to track how many copies of an
IStrcurrently exist, allowing the interner to recover memory when all copies have been dropped.Copy, sinceCloneimpl would increment said counter.IStr::as_strandIStr::as_c_strmethods to return non-'staticreferences, since they could no-longer out-live theIStr(without some other way to first permanently-leak it)