-
Notifications
You must be signed in to change notification settings - Fork 81
Open
Description
Hi,
I have an app that generates cards for a boardgame. The text varies a lot, so I set the fontsize dynamically, in a do/while loop, where I check if the textBox is Truncated or not. here's a simple example:
RichString textBox = null;
var fontSize = 1000;
do
{
fontSize--;
textBox = new RichString
{
MaxHeight = 512,
MaxWidth = 512
};
textBox.Add("test test test test test", fontSize: fontSize);
} while (textBox.Truncated);
The issue is, if the while loop runs a lot, the memory consumption of my app skyrockets. Here's an example snapshot:

As you can see, there are more then 16 million StyleManagers, and there's a huge Dictionary<string, Topten.RichTextKit.Style>.
I'm not sure if it's a bug, or I misuse it. Can you have a look at it?
Metadata
Metadata
Assignees
Labels
No labels