Replies: 1 comment
-
@Hanuwa Thanks a lot for pointing this bug. The solution works perfectly, now maximum memory increase will be 5 mb (for default icons) which is pretty fine. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I noticed while invoking the MessageBox, that every time a new one opens up it will add about 1mb of memory continuously to a program and it never gets released, it will just keep stacking up, I looked at the code and found the culprit.
The images, these are loaded into memory each time they are called and from my testing they consume quite a bit of resources, I have a proposition, load the images once they are used and stored them in a dictionary so we can just reuse them across different instances. Here is my example of how I kinda did this:
With this I only notice a slight amount of memory increase and only when a new icon was invoke. This is only a suggestion but I think it could be an useful one, I also want to thank you for how big of a contribution you have provided to the customtkinter library, you have provided tremendous help for many of us.
If you can please test this to see if you can also see this continuous memory increase, it will be very appreciated :)
Beta Was this translation helpful? Give feedback.
All reactions