LiveMarkdown.Avalonia.MemoryFix 2.2.1-memoryfix

This is a prerelease version of LiveMarkdown.Avalonia.MemoryFix.
dotnet add package LiveMarkdown.Avalonia.MemoryFix --version 2.2.1-memoryfix
                    
NuGet\Install-Package LiveMarkdown.Avalonia.MemoryFix -Version 2.2.1-memoryfix
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="LiveMarkdown.Avalonia.MemoryFix" Version="2.2.1-memoryfix" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="LiveMarkdown.Avalonia.MemoryFix" Version="2.2.1-memoryfix" />
                    
Directory.Packages.props
<PackageReference Include="LiveMarkdown.Avalonia.MemoryFix" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add LiveMarkdown.Avalonia.MemoryFix --version 2.2.1-memoryfix
                    
#r "nuget: LiveMarkdown.Avalonia.MemoryFix, 2.2.1-memoryfix"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package LiveMarkdown.Avalonia.MemoryFix@2.2.1-memoryfix
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=LiveMarkdown.Avalonia.MemoryFix&version=2.2.1-memoryfix&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=LiveMarkdown.Avalonia.MemoryFix&version=2.2.1-memoryfix&prerelease
                    
Install as a Cake Tool

LiveMarkdown.Avalonia memory fix build / 内存修复版

This package is a memory-focused maintenance build of the original project: DearVa/LiveMarkdown.Avalonia.

Original author: DearVa.

说明:这是 LiveMarkdown.Avalonia 的内存修复版,基于原作者 DearVa 的原项目维护打包。

This memory fix build uses the separate NuGet package ID LiveMarkdown.Avalonia.MemoryFix, keeps the original assembly/API surface, and adds fixes for Markdown preview memory retention and first-load memory pressure in Avalonia applications.

Key changes in this build:

  • Clear rendered Markdown visual nodes when MarkdownBuilder is set to null or empty.
  • Unsubscribe ObservableStringBuilder event handlers when the renderer leaves the visual tree.
  • Share the Markdig pipeline across renderer instances.
  • Avoid strong static references from link hit testing.
  • Cancel image-loading tasks and release image sources when image controls are detached.
  • Disable TextMate syntax highlighting for Markdown code blocks by default to reduce first-load memory usage.
  • Avoid eager code-block template creation during node construction.

Syntax highlighting can be enabled explicitly by setting MarkdownRenderer.EnableSyntaxHighlighting to true.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.2.1-memoryfix 54 7/14/2026

Memory fix build / 内存修复版 with package ID LiveMarkdown.Avalonia.MemoryFix. Original project: DearVa/LiveMarkdown.Avalonia (https://github.com/DearVa/LiveMarkdown.Avalonia). Fixes rendered-node retention on clear/null, event unsubscription on detach, image task cleanup, weak link cache, shared Markdig pipeline, and disables TextMate code-block highlighting by default to reduce first-load memory pressure.