composer/composer — pull request #1981 by orukusaki (2013-06-07 16:18:09+00:00)
Title: Unbind the filter Closure from ArchivableFilesFinder to allow the object to be garbage collected

In PHP 5.4, the Closure created in ArchivableFilesFinder is bound to the object, and this prevents garbage collection from destroying the finder, and closing the DIR handle. This can cause the file handle limit to be exceeded. See https://github.com/composer/satis/issues/64

This change unbinds the closure from the object (in 5.4), so that the garbage collection can destroy the finder when it is no longer referenced.