Hi Pyside Experts, I have written a GUI/Image viewer using Pyside. It works perfectly for my purpose except that as I browse through the images, the memory consumption of computer increases.
The code snippet that is responsible for the memory leak is this: self.pixmap = QtGui.QPixmap(str(self.nb) + "_" + str(self.fig_type) + ".jpeg") self.pixmap = self.pixmap.scaled(1000, 4000, QtCore.Qt.KeepAspectRatio, mode=QtCore.Qt. SmoothTransformation) self.lbl.setPixmap(self.pixmap) if not self.added_lbl: self.layoutImW.addWidget(self.lbl) self.added_lbl = True self.lbl.setGeometry(500, 500, self.pixmap.width(), self.pixmap.height()) Actually it is the first statement of the code snippet that is the root of all the evil. If instead of the variables : 'self.nb' and 'self.fig_type', I try to load the same image, I don't face the problem. Is there any way to avoid the memory leak? I tried QtGui.QPixmap.deref() before the first image, it does seem to work. If any part of the code is not clear, please let me know and I will get back to you immediately. Thanks you very much, Hannu
_______________________________________________ PySide mailing list PySide@qt-project.org http://lists.qt-project.org/mailman/listinfo/pyside