From: Walton Hoops Date: 2010-12-07T13:03:25+09:00 Subject: Re: Manual Memory Management and Automatic Garbage Collection On 12/06/2010 08:48 PM, Tridib Bandopadhyay wrote: > I shifted the printf statement above the return statement.Here is the > output I am getting-- > > ./ruby doug.rb > Please enter number 1 : 3 > Please enter number 2 : 4 > Answer : 7 > 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899-bash-3.00$ Most likely Garbage Collection is not being run for your (rather short) script. Does your message print when you run GC.start()? If so your message is working fine. Try writing something that creates a log of garbage to be collected. I think something like: i=1 while (true) puts "message #{i}" i+=1 end should do the trick. Of course, that particular program will never exit.