Hi Florian, Thank you for the input here. The above example is somewhat contrived. I have more code in the actual application that does things like setting up LCD and calling GUI_Init(). The actual application callback handles things like touch, painting, focus, and sizing the windows. Here I was just trying to have a minimum setup that causes the leak. I will try and remove the WM_SetCallback(NULL). In the meantime, I have worked around the leak by adjusting the button class that I have wrappin…
Yes, I can confirm that WM_DeleteWindow(_hWnd); gets called for each created button. Is there anything additional that needs to be done to de-allocate the string? I only observe this leak when both the BUTTON_SetText(checkbox,"test") and WM_SetCallback(checkbox, callback) are called. Either can be called individually without a leak.
I have been running an application using EMWin for a while. A client discovered that some of the screen elements began disappearing after running for around 2 months. I have isolated this to what appears to be a memory leak in EmWin. I am periodically monitoring the used memory in emwin and printing it out. I have observed a few things. 1) removing C Source Code (1 line)eliminates the memory leak. 2) removing Source Code (1 line) also eliminates the memory leak. Any thoughts on this would be app…