-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Memory issue #44
Comments
Can confirm memory leaks with loadFont() in a loop till system crashing an reseting. Update Checked library and my code, found out, that the library haven't memory leak. A memory leak appear with following code `function1(){ function2(){ Correct will be: Example 1 `function1(){ function2(){ Example 2 `function1(){ function2(){ |
Where do you load fonts from? Thank you. |
it have nothing to do with the font itself. when you use doubles time loadFont() and use unloadFont(), you will get a memory leak. i had posted the smallest code. this is incorrect: void function1(){ void function2(){ in this example, load font will be load, then a call to function2 with loadFont again without unloadFont before. after second time loadFont comes unloadFont and a second time again. this is not working and will get a memory leak. after loadfont, you will need to unloadFont again, after that u can call the LoadFont again. |
Please tell me a complete sketch (code) that can be executed by copy-paste to accurately verify the issue.
Thank you. |
Here is my Git What microcontroller is used? Is the development environment Arduino? Are the fonts to be loaded the same? Are they different? Are the fonts loaded from SD? Is there one instance of OpenFontRender? More than one? Where is function1 called from? setup or loop? |
Hello, I am using a OpenFontRender on ESP32 together with TFT_eSPI and I am using multiple fonts. I noticed that after loadFont() and then unloadFont(), approximately 50 bytes of memory remain allocated. So after each loadFont() - unloadFont() of another font, the memory usage increases until the system crashes.
The text was updated successfully, but these errors were encountered: