diff --git a/src/Avalonia.Base/Media/TextFormatting/Unicode/BiDiAlgorithm.cs b/src/Avalonia.Base/Media/TextFormatting/Unicode/BiDiAlgorithm.cs index 0bea4def28..093c7f3f56 100644 --- a/src/Avalonia.Base/Media/TextFormatting/Unicode/BiDiAlgorithm.cs +++ b/src/Avalonia.Base/Media/TextFormatting/Unicode/BiDiAlgorithm.cs @@ -98,7 +98,7 @@ namespace Avalonia.Media.TextFormatting.Unicode /// The status stack used during resolution of explicit /// embedding and isolating runs /// - private readonly PooledStack _statusStack = new PooledStack(); + private readonly Stack _statusStack = new Stack(); /// /// Mapping used to virtually remove characters for rule X9 @@ -108,7 +108,7 @@ namespace Avalonia.Media.TextFormatting.Unicode /// /// Re-usable list of level runs /// - private readonly PooledList _levelRuns = new PooledList(); + private readonly List _levelRuns = new List(); /// /// Mapping for the current isolating sequence, built @@ -119,7 +119,7 @@ namespace Avalonia.Media.TextFormatting.Unicode /// /// A stack of pending isolate openings used by FindIsolatePairs() /// - private readonly PooledStack _pendingIsolateOpenings = new PooledStack(); + private readonly Stack _pendingIsolateOpenings = new Stack(); /// /// The level of the isolating run currently being processed @@ -175,12 +175,12 @@ namespace Avalonia.Media.TextFormatting.Unicode /// Reusable list of pending opening brackets used by the /// LocatePairedBrackets method /// - private readonly PooledList _pendingOpeningBrackets = new PooledList(); + private readonly List _pendingOpeningBrackets = new List(); /// /// Resolved list of paired brackets /// - private readonly PooledList _pairedBrackets = new PooledList(); + private readonly List _pairedBrackets = new List(); /// /// Initializes a new instance of the class. @@ -1273,7 +1273,7 @@ namespace Avalonia.Media.TextFormatting.Unicode /// Locate all pair brackets in the current isolating run /// /// A sorted list of BracketPairs - private PooledList LocatePairedBrackets() + private List LocatePairedBrackets() { // Clear work collections _pendingOpeningBrackets.Clear(); @@ -1720,13 +1720,8 @@ namespace Avalonia.Media.TextFormatting.Unicode { _workingClassesBuffer.Dispose(); _resolvedLevelsBuffer.Dispose(); - _statusStack.Dispose(); _x9Map.Dispose(); - _levelRuns.Dispose(); _isolatedRunMapping.Dispose(); - _pendingIsolateOpenings.Dispose(); - _pendingOpeningBrackets.Dispose(); - _pairedBrackets.Dispose(); } } }