fix: Adds optimized formatter for clilocs (#1045)
Adds an optimized formatter for localization. Example:
```cs
string localizationText = Localization.Format(1050039, "enu", $"{m_Amount}\t{LabelNumber:#}");
```
Fixes #1044
This commit is contained in:
parent
ecbee17690
commit
5f00330a66
6 changed files with 248 additions and 53 deletions
|
|
@ -127,6 +127,11 @@ public class STArrayPool<T> : ArrayPool<T>
|
|||
buckets[i]?.Trim(ticks, pressure, GetMaxSizeForBucket(i));
|
||||
}
|
||||
|
||||
if (_cacheBuckets == null)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// Under high pressure, release all cached buckets
|
||||
if (pressure == MemoryPressure.High)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue