From: Yukihiro Matsumoto Date: 2001-05-10T09:40:05+09:00 Subject: [ruby-talk:14926] Re: [Q] Ruby garbage collector and non-ruby objects? Hi, Leo writes: |For example, assume I have a ruby extension written in C "mylib.so" |It has some *local* variable which allocates memory using malloc: |Will the Ruby garbage collector recycle the memory allocated in foo() when p_p |local variable goes out of scope? Or should I explicitly call "free(p_p)" ? You should explicitly call free() or wrap and make them Ruby Objects using Wrap_Data_Struct(). matz.