50 XFont objects?
Fonts should only be added once to FontDataStock.
If you create 50 XFont objects for "Courier,10", the memory usage should stay low (otherwise there is a bug).
FontDataStock.UnregisterFontData is not yet implemented.
imgen wrote:
FYI, my program uses the office 2007 like live preview so that it creates different XFont objects when user is hovering one font family and that cause the going up of the memory usage.
Workaround: So this preview shouldn't use XFont objects.
Hack: add a setter to "public static FontDataStock Global" that allows you to set it to null (when the users hover over fonts).