8000 Work around a huge memory leak in PySide on Python 3 by cgohlke · Pull Request #1323 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Work around a huge memory leak in PySide on Python 3 #1323

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 18, 2012
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add a comment to revert PR #1323 in the future
  • Loading branch information
cgohlke committed Oct 2, 2012
commit 43e8be2ec3ee7b9b4679d397a31ab9ab32ea83d3
5 changes: 4 additions & 1 deletion lib/matplotlib/backends/backend_qt4agg.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,12 @@ def paintEvent( self, e ):
p.drawRect( self.rect[0], self.rect[1], self.rect[2], self.rect[3] )
p.end()

# This works around a bug in PySide 1.1.2 on Python 3.x,
# where the reference count of stringBuffer is incremented
# but never decremented by QImage.
# TODO: revert PR #1323 once the issue is fixed in PySide.
del qImage
if refcnt != sys.getrefcount(stringBuffer):
# Fix a huge memory leak in PySide on Python 3
_decref(stringBuffer)
else:
bbox = self.blitbox
Expand Down
0