[#79532] Immutable Strings vs Symbols — Daniel Ferreira <subtileos@...>

Hi,

15 messages 2017/02/15

[ruby-core:79732] Re: [Ruby trunk Feature#13077] [PATCH] introduce String#fstring method

From: Eric Wong <normalperson@...>
Date: 2017-02-24 01:04:49 UTC
List: ruby-core #79732
shyouhei@ruby-lang.org wrote:
> Nobuyoshi Nakada wrote:
> > Shyouhei Urabe wrote:
> > > Am I correct that rb_vm_fstring_table() is never GCed?
> > 
> > That table is not a GC-root, and registered strings get GCed as usual.
> 
> So this is a kind of weak reference? No security concern then.

Right.  Also, keep in mind that dynamic GC-able symbols from
2.2+ also stores symbol names as fstrings.  Thus GC-able symbols
would not work if fstrings could not be GC-ed.

Anyways, committed as r57698

Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next