8000 Merge pull request #12092 from simon-kraeusel/fix-issue-12089 · matplotlib/matplotlib@603b4fa · GitHub
[go: up one dir, main page]

Skip to content

Commit 603b4fa

Browse files
authored
Merge pull request #12092 from simon-kraeusel/fix-issue-12089
Update backend_qt5agg to fix PySide2 mem issues
2 parents 10ffa53 + 871a97a commit 603b4fa
Copy full SHA for 603b4fa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/backends/backend_qt5agg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def paintEvent(self, event):
6464
painter.drawImage(origin / self._dpi_ratio, qimage)
6565
# Adjust the buf reference count to work around a memory
6666
# leak bug in QImage under PySide on Python 3.
67-
if QT_API == 'PySide':
67+
if QT_API in ('PySide', 'PySide2'):
6868
ctypes.c_long.from_address(id(buf)).value = 1
6969

7070
self._draw_rect_callback(painter)

0 commit comments

Comments
 (0)
0