albertz / music-player-core

Music player core Python module
BSD 2-Clause "Simplified" License
74 stars 22 forks source link

"Too many open files" error #6

Closed lightpriest closed 9 years ago

lightpriest commented 9 years ago

After a while, a player will hit an open file limit.

It happened to me in something I'm working on, but for simplicity I'd like to ask that on the main example in the README. It calls open() without calling close(), but even if adding

class Song():
  def __del__(self):
      self.f.close()

to it, it seems as if peeked (i.e. peekQueue) songs are never getting delleted.

Perhaps this example is a rather simple one and I should not base my findings on that. If that's the case, how would you suggest writing this?

albertz commented 9 years ago

No, you are right, if they are not deleted, even/esp in the main example, that is a bug. I will look into it when I have some time.

albertz commented 9 years ago

I tried to fix it in 5ebd706 and 4c02c58. Can you try?

lightpriest commented 9 years ago

Perfect. :+1: