I have read in many sources that it is better to avoid using update method at all. But I have a situation, that it is the only thing that is working (even update idletask does not help) and looks like the code will not produce memory leak. Here is a simple example:
import tkinter as tk
root = tk.Tk()
def do_something():
# === there I have some code ===
root.update()
root.after_idle(do_something)
do_something()
root.mainloop()
As far as I can judge, it is not possible here to be loops and memory leaks. Because I am using after_idle, it will run function again when there are no events left in mainloop to process, that is, in my opinion, will happen after root.update have finished. Am I right or there could be special cases when this code will fail?