From: matz@... (Yukihiro Matsumoto) Date: 2004-07-28T19:11:10+09:00 Subject: Re: cgi.rb possible memory leak Hi, In message "cgi.rb possible memory leak" on 04/07/28, Kent Sibilev writes: |Recently I've noticed that the memory usage of our Ruby processes goes |very high after intensive usage and never goes down. I wrote a simple |memory monitoring tool which uses ObjectSpace module to display the |current heap content. I noticed that there were a lot of StringIO and |Tempfile object hanging around and never got released by garbage |collector. The only place where these objects can be created is inside |the CGI class when the HTTP POST request has a multipart form. Having |spent a couple of hours in debugger, I was able to identify the source |of the problem. All these objects were marked by rb_mark_end_proc(), |which was very alarming especially that 'end_procs' list was unusually |huge. CGI_PARAMS and CGI_COOKIES are obsolete. So we can (and should) remove their supporting code, in which at_exit call exists. Will be fixed soon. matz.