[PyQt] PyQt Phonon video player memory leak

Andreas Pakulat apaku at gmx.de
Tue May 8 16:15:31 BST 2012


Hi,

please keep the discussion on the list.

On Tue, May 8, 2012 at 11:29 AM, <juddsim at gmail.com> wrote:

> Each instance created allocates 40mb (I'm just looking at the task
> manager) and eventually the app gets to like 2 gigs and crashes.
>

The task-manager is not necessarily a good leak-detector. Can you provide a
small self-contained example which demonstrates this? I've
just tried here with a small video thats replayed and each 5 seconds the
player instance is stopped, removed from the layout and del'ed and
the memory consumption doesn't even reach 20M - thats minus the shared
memory already. The important bit seems to be to stop the playing
url, otherwise the player-object seems to not be garbage collected.


> I'm not familiar with a valgrind log file.
>

Valgrind is a multi-purpose tool, among others it can help you detect
memory leaks in applications. Its Linux-Only though, but there are similar
tools for other platforms afaik. A task-manager's memory-column is not
always a good measurement for detecting actual memory leaks.

Andreas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20120508/f6c0b1a3/attachment.html>


More information about the PyQt mailing list