From: Markus Jais Date: 2001-12-19T23:46:24+09:00 Subject: [ruby-talk:28909] Re: memory management Petr Fischer wrote: > Hi, > > I am new in ruby language (I am new in languages based on garbage > collection). > > I use huge memory arrays, such as: > > a = [] > a[10000000] = "bla" // this allocates 40MB of memory on Win2000 > // ...some work with array > > And now, array "a" is unnecessary for me. > > a = [] > > But 40MB of memory is still allocated (in task manager on Win2000). > > How I free allocated memory? hi try calling GC.start this starts the garbage collection of ruby. if this does not work, try setting a to nil I am not sure if this works, just a guess. markus > > Thanks for help, Petr