Alex Fenton
4/1/2008 2:31:00 PM
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