I\'m using .NET 4.5 on Windows 7, and might find a memory leak.
I have a TextBlock
(not TextBox
- it\'s not the Undo problem), which changes it
A FontFamily
leaks UnmanagedMemoryStreams
when it is used if it was sourced from an embedded resource or a relative path. When the FontFamily
is sourced from a system font or absolute path, it does not leak.
You can look here and download the project that reproduces the problem.
Workaround: For Resource fonts: save fonts into a temporary folder and use the absolute path to the stored font. For relative path fonts: resolve and use the absolute path instead.