MaterialDesignThemes.CustomResources
1.0.0
dotnet add package MaterialDesignThemes.CustomResources --version 1.0.0
NuGet\Install-Package MaterialDesignThemes.CustomResources -Version 1.0.0
<PackageReference Include="MaterialDesignThemes.CustomResources" Version="1.0.0" />
paket add MaterialDesignThemes.CustomResources --version 1.0.0
#r "nuget: MaterialDesignThemes.CustomResources, 1.0.0"
// Install MaterialDesignThemes.CustomResources as a Cake Addin #addin nuget:?package=MaterialDesignThemes.CustomResources&version=1.0.0 // Install MaterialDesignThemes.CustomResources as a Cake Tool #tool nuget:?package=MaterialDesignThemes.CustomResources&version=1.0.0
MaterialDesignThemes.CustomResources
A mitigation for a WPF memory leak
WPF (.net core and full .net) has a memory leak regarding using a font source with FontFamily. This is discussed in issue #746 from Material Design in Xaml Toolkit
This solution/mitigation is based on Dominic Jonas idea and adapted to be used/integrated by Material Design in Xaml Tookit.
To verify the issue open the full .net Demo and change the MainPage, Page1 and Page2 to use default font family sintax:
FontFamily="{DynamicResource MaterialDesignFont}"
Follow steps:
- Run it;
- Take a snapshot from Visual Studio Diagnostics Tool.
- Look form Unmanaged Resources. You find 101.
- Open Page 1;
- Take a snapshot from Visual Studio Diagnostics Tool.
- Look form Unmanaged Resources. You find 106.
- Open Page 2;
- Take a snapshot from Visual Studio Diagnostics Tool.
- Look form Unmanaged Resources. You find 110.
- Open Page 1 again;
- Take a snapshot from Visual Studio Diagnostics Tool.
- Look form Unmanaged Resources. You find 113.
Apply the fix in the MainPage, Page1 and Page2:
FontFamily="{customResources:FontResource FontName=Roboto}"
And redo the steps. You won't see the same problem.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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. |
.NET Core | netcoreapp3.1 is compatible. |
.NET Framework | net472 is compatible. net48 was computed. net481 was computed. |
-
.NETCoreApp 3.1
- No dependencies.
-
.NETFramework 4.7.2
- No dependencies.
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 |
---|---|---|
1.0.0 | 6,655 | 12/14/2019 |