QPolygon memory leak

"Schoof, Tim" <[email protected]> Wed, 6 May 2020 13:33:40 +0200 (CEST)
Newsgroups gmane.comp.python.pyqt-pykde
Message-ID <[email protected]>
Hi,

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:
        pass

    # 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,
Tim