[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Frantic (again)



David Mikesell wrote:
On Mon, 26 Jun 2006 18:25:25 +0200, "DR0ID" <dr0id@xxxxxxxxxx> said:

Perhaps you should also take a look a the garbage collector for reducing the memory usage. This version is better as the last one but still, 500 MB is to high mem usage. I wonder what is taking so much memory.

How does pygame.mixer.music manage memory? When I load a new track is
the previous one unloaded?


The pygame website says
"The difference between the music playback and regular Sound playback is that the music is streamed, and never actually loaded all at once. The mixer system only supports a single music stream at once."
so I'm guessing that whenever you make a new stream it kills the old stream.
And since the music is streaming it shouldn't use up more than a few KB of memory. It doesn't cache anything it seems.
If ya let us look at your code maybe we could help you track down the memory hog ;)
Good Luck.
-Luke