From: Srijayanth Sridhar Date: 2008-05-28T23:37:39+09:00 Subject: Memory concerns wrt garbage collection etc Hello, I have a script which basically launches several threads, each of them parsing a web page from a different link using Hpricot. I am not sure how many threads get spawned, could be in the hundreds. The question I have is, assuming we have a simple scenario where: doc=Hpricot.new(open("http://somewhere/")) # a bunch of processing doc=Hpricot.new(open("http://somewhere.else/")) # some more processing here. When does the memory from the first instance get released? As soon as no references point to that chunk of memory or right at the end of the scope of wherever that object was instantiated? Can someone please tell me as I have to my script running for months perhaps and I don't know if its going to sit there eating memory for no reason :) Thank you, Jayanth