| 82 | } |
| 83 | |
| 84 | inline void String::destruct() { |
| 85 | // If not SSO, delete the data |
| 86 | if (_small.size & Implementation::SmallStringBit) return; |
| 87 | // Instances created with a custom deleter either don't the Global bit set at all, or have it set but the deleter |
| 88 | // is a no-op passed from nullTerminatedView() / nullTerminatedGlobalView(). Thus *technically* it's not needed to clear |
| 89 | // the LargeSizeMask (which implies there's also no way to test that it got cleared), but do it for consistency. |
| 90 | if (_large.deleter) _large.deleter(_large.data, _large.size & ~LargeSizeMask); |
| 91 | else delete[] _large.data; |
| 92 | } |
| 93 | |
| 94 | inline String::Data String::dataInternal() const { |
| 95 | if (_small.size & Implementation::SmallStringBit) |