Skip to content

possible GDI Object leak on Windows #73

@carlfarrington

Description

@carlfarrington

Every time get_monitors() is called, the GDI Objects count for the python process on win32 increases.
Once the 10,000 GDI Object hard limit is reached, the desktop becomes lagged, and GUI things break (my script is managing an application's full-screen status, and the result is a corrupted / not-fully-repainted window).

A small test, if you add the GDI Objects column to taskmgr, you can see the count continually increase.

while True:
    for m in get_monitors():
        print(str(m))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions