Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

PySide2 memory leak during canvas paintEvent #12089

Copy link
Copy link
Closed
@simon-kraeusel

Description

@simon-kraeusel
Issue body actions

Bug report

A memory leak occurs during every frame draw when PySide2 is used with Python3. This issue was already fixed for PySide in the method matplotlib.backends.backend_qt5agg.FigureCanvasQtAgg.paintEvent
However, an additional check for QT_API == 'PySide2' is needed.

Code for reproduction

import matplotlib
matplotlib.use('Qt5Agg')
import matplotlib.pyplot as plt
plt.plot([1,2],[1,2])
plt.show()

Actual outcome

When a redraw of the figurecanvas is forced, the program memory increases steadily. For example during resizing the popup window.

Expected outcome

Constant memory during ui execution.

Matplotlib version

  • Operating system: Windows 10
  • Matplotlib version: 2.2.2
  • Matplotlib backend (print(matplotlib.get_backend())): Qt5Agg
  • Python version: 3.7

all packages are pip installed

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.