From: Alex Fenton Date: 2008-04-01T23:35:15+09:00 Subject: Re: Detaching free function from String in C API ts wrote: > Alex Fenton wrote: >> Is the same thing is possible with an in-built ruby String object, to >> set it so that the underlying char* contents will not be freed when the >> String is GC'd? > > Look at mmap (in RAA), when you write > > m = Mmap.new("aa") > > the object in `m' is in reality a String object and mmap make in > sort that ruby will never free the char * content, otherwise it > will crash. Perfect, thanks. I will read the source and ponder alex