From: Cam Date: 2006-05-11T04:42:01+09:00 Subject: Re: garbage-collection question OR ruby-gnome bug? Hey, On 5/10/06, Robert Klemme wrote: > I can only say something about your short demo piece because I don't > have the other code. It's quite unlikely that you see the GC kick in > before program termination here. GC kicks in when the interpreter > decides to do it - not necessarily soon after an object has become > unreachable. This is really only a problem if you have a long running > version and it keeps using more memory over time. I suggest you > modify your script by removing lines with "gets" and put the whole > thing in a loop say 10,000 times. Then watch how memory usage > develops. If it's linearly increasing your chances are that there is > a bug in Gdk or you're using it the wrong way (i.e. do not release Gdk > resources as required by the lib). I had thought about the GC not having time to free up the resources, but I assumed that the GC would start doing its magic whenever the program was idle. Anyway, the real program is much more complex than this, and it should be having plenty of time for GC. Is it common for a library to require releasing of resources? I will look into that further, although I don't *think* i saw anything about that in the docs. Thanks, Cameron Matheson