From: nobu.nokada@... Date: 2003-04-08T11:33:38+09:00 Subject: Re: [embedding] keeping track of non-exported global variables Hi, At Tue, 8 Apr 2003 02:49:23 +0900, Simon Strandgaard wrote: > Arrays works fine for me, but im still wondering why > both mod_ruby, vim, ruby++ uses hashes ??? > It seems odd. I don't know true reason, but I kind of guess it's because removing an object from a hash is faster than an array when they have many elements. > Objects::~Objects() { > /* flush array in order to kill em > I do not think this is necessary at all. > I am assuming that calling ruby_finalize() > would effectivly kill all! > todo: is flushing necessary? */ > } Registered variable must not contain invalid VALUE - other than object, Fixnum, Symbol, true, false and nil. If you're really sure that any "Objects" instances never get destructed until ruby_finalize(), it would not be necessary. Otherwise, it causes GC crashes at high possibility. -- Nobu Nakada