Skip to content

Tkinter StringVar memory leak? #132355

@qhangfan

Description

@qhangfan

Bug report

Bug description:

I wrote a stock data display board using tkinter, which refreshes the textvariable of a Label after receiving new stock data.
pyton code:

stock_price=StringVar()
'''
Sorry I can't provide an interface for stock data because it contains account information. In short, you will get a variable called last_price
'''
stock_price.set(last_price)

I tried many times, but the memory usage kept increasing due to the high frequency of changing the 'textvariable' of the Label component.
I hope this can be fixed, thank you very much.

CPython versions tested on:

3.12

Operating systems tested on:

Windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    pendingThe issue will be closed if no feedback is providedstdlibStandard Library Python modules in the Lib/ directorytopic-tkintertype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions