4 ms·
The problem with sharing is that you can inadvertently keep a massive string alive by only holding on to a tiny piece of it. Span<T> conveniently side steps th
by Locke1689 10y ago
The problem with sharing is that you can inadvertently keep a massive string alive by only holding on to a tiny piece of it.
Span<T> conveniently side steps this issue by only existing on the stack, meaning that you can't stash away the span somewhere and accidentally keep the underlying buffer alive longer than necessary.