At Fri, 21 Dec 2001 15:57:16 +0900,
matz / ruby-lang.org (Yukihiro Matsumoto) wrote:
> |> The original problem iirc was about repetitively loading the same file
> |> over and over again.
> |> If one refers to the "intern"ed version of that filename, wouldn't it
> |> always refer to the same string?
> |
> |Yes.  It's similar to my proposal except using a particular
> |table instead of one for Symbol.
> 
> [ruby-talk:28803]? I don't think so.  Your patch scans filename
> strings.  It's complete, but slow.

No, later [ruby-talk:29152].  I didn't post the patch.

> Christensen's proposal is
> cheaper.  But I'm not sure if it's effective enough.  For example, it
> does not prevent leaks like:

Sure, although I didn't want to point out it :-).  It's only
problem there's no way to know when filenames get unreferred.

The only way I could think of is making nd_file a String VALUE
and marking them directly from each NODE's.  It prevents leaks
but doesn't make GC notably slow.  Though it may be a big
modification.


Nobu Nakada