Skip to content

count extant IStrs #1

@ickk

Description

@ickk

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions