QPolygon memory leak

Schoof, Tim tim.schoof at desy.de
Wed May 6 12:33:40 BST 2020


the following script leaks large amounts of memory:

from PyQt5.QtGui import QPolygonF
from PyQt5.QtCore import QPointF

polygon = QPolygonF()
polygon.append(QPointF(0, 0))

while True:
    for point in polygon:

    # point = polygon[0]  # this leaks as well

This happens on Debian 9 and 10, Ubuntu 18.04.2, and in a Python 3.6.9 venv with PyQt5-sip-12.7.2 and pyqt5-5.14.2 installed from wheels.

The leak also occurs with PyQt4.

Best regards,

More information about the PyQt mailing list