Bug #3336: Memory leak in IO.select() on Windows
http://redmine.ruby-lang.org/issues/show/3336

Author: HD Moore
Status: Open, Priority: Normal
Category: core
ruby -v: ruby 1.9.3dev (2010-05-21 trunk 27931) [i386-mingw32]

The IO.select() method leaks memory on the Windows platform (tested mingw32). This prevents any long-running service process from working properly on Windows and is a blocker for application development. Using LeakDiag, I tracked this down to an fdset not being freed properly, but I am not sure what the proper solution is yet,

To quickly reproduce this issue, run the following snippet:

require 'socket'
a = TCPServer.new(8888)
while true
  IO.select([a], nil, nil, 0.01)
end

Watch the memory usage spike up in the task manager or process explorer.


----------------------------------------
http://redmine.ruby-lang.org