mpf-mc memory leak in track.pyx ?

17 views
Skip to first unread message

Marc Rechté

unread,
Aug 27, 2025, 2:30:41 AM (12 days ago) Aug 27
to MPF Users
Hello. I wonder whether there is not a memory leak, I don't see the code to free the buffer in __dealloc__ ? https://github.com/missionpinball/mpf-mc/blob/dev/mpfmc/core/audio/track.pyx#L57

Anthony van Winkle

unread,
Aug 27, 2025, 8:55:29 PM (11 days ago) Aug 27
to MPF Users
It's possible, but probably not?

Tracks are instantiated at startup and do not change over the course of the game, so during the run of a game this allocation should remain consistent. It's vaguely possible there could be a leak after closing, but I'm pretty sure the CPython code is all run withing the Python environment which will do all of its garbage collection when the app exits.

In our testing and memory stress tests I've never noticed a leak based on audio, but in any case MPF-MC is deprecated so it won't really be an issue going forward :) 

Reply all
Reply to author
Forward
0 new messages