View Issue Details

IDProjectCategoryView StatusLast Update
0002483NoesisGUIC++ SDKpublic2026-04-01 02:36
Reporterjsantos Assigned Tojsantos  
PrioritynormalSeverityminor 
Status assignedResolutionopen 
Product Version3.1.6 
Target Version3.2 
Summary0002483: Memory leak removing Font provider
Description

From https://www.noesisengine.com/forums/viewtopic.php?t=2821

So, I figured out the memory leak issue. It is indeed a bug in our code, but a very odd one, so I suggest you to take a look into it on your side as well or at least document it.

First, while picking apart literally everything inside our resources, I noticed the memory leak only happens if there are TextBlock or TextBox objects in the resources (e.g. in some control templates). The more instances of TextBlock/Box there are the larger the leak.
Then, while trying to remove as much code as possible between load and Shutdown, I noticed we have following lines that are absent from your examples:

Noesis::GUI::SetTextureProvider(0);
Noesis::GUI::SetXamlProvider(0);
Noesis::GUI::SetFontProvider(0);

This code wasn't written by me, but I never paid attention, because it looked like a reasonable thing to do. Turns out it isn't :)
Setting Font provider to null like this causes a memory leak on Shutdown if I have TextBlocks inside resources!
It is also reproducible in your examples, simply by adding GUI::SetFontProvider(0); before Shutdown

PlatformAny

Relationships

related to 0002487 assignedjsantos (3.20b1) Noesis::Shutdown() crashes 

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2023-01-02 12:49 jsantos New Issue
2023-01-02 12:49 jsantos Target Version => 3.2.0
2023-01-02 12:49 jsantos Assigned To => jsantos
2023-01-02 12:49 jsantos Status new => assigned
2023-01-02 12:49 jsantos Description Updated
2023-01-20 11:04 sfernandez Relationship added related to 0002487
2023-03-27 12:14 jsantos Target Version 3.2.0 => 3.2
2026-04-01 02:36 jsantos Description Updated