kornel , 1 month ago @became_fish Yes, because String is heap allocated by definition. It's {ptr, capacity, len}. &str is ambivalent about the data source, and guarantees to never run any destructor or free() on the pointer. Cow<str> holds a bool that tracks whether to free or not.
@became_fish Yes, because String is heap allocated by definition. It's {ptr, capacity, len}.
&str is ambivalent about the data source, and guarantees to never run any destructor or free() on the pointer.
Cow<str> holds a bool that tracks whether to free or not.