mirror of
https://github.com/xoofx/markdig.git
synced 2026-02-03 21:36:36 +00:00
[PR #417] Cleanup StringBuilderCache #1010
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Original Pull Request: https://github.com/xoofx/markdig/pull/417
State: closed
Merged: Yes
StringBuilderCacheused to inherit fromDefaultObjectCache<StringBuilder>, and instances were being passed around.However, nobody was actually using those instances, with one exception:
CodeInlineParser.All other code uses
StringBuilderCache.Local(). As it turns out, there is actually no reason whyCodeInlineParsercould not do the same.This PR changes
StringBuilderCacheto be astatic class, no longer inheriting fromDefaultObjectCache<StringBuilder>. All references to instances are removed.CodeInlineParserwas modified to useStringBuilderCache.Local()as well.It goes without saying that this is a breaking change, as the class and most of the instance references were public.