nikhilm / node-taglib

Simple taglib bindings to Javascript using node.js
http://nikhilm.github.com/node-taglib
MIT License
147 stars 25 forks source link

Too many open files #13

Closed jacobrask closed 12 years ago

jacobrask commented 12 years ago

Do I need to do something to close node-taglib fd's after it has read a file? Running it on a huge dir gives TagLib: Could not open file after a while, and other file operations in my app then fail with Error: EMFILE, Too many open files.

Or are there any other suggestions on how to make sure node-taglib doesn't open more fd's than are available per process on my system?

nikhilm commented 12 years ago

The destructor now disposes the FileRef so that fds don't get used up. If you want to keep around lots of Tag objects, the problem will still occur. The solution is to deep copy the properties out of the tag and just store those.