Skip to content
  • Peter Zhu's avatar
    bfb395c6
    Implement weak references in the GC · bfb395c6
    Peter Zhu authored
    
    
    [Feature #19783]
    
    This commit adds support for weak references in the GC through the
    function `rb_gc_mark_weak`. Unlike strong references, weak references
    does not mark the object, but rather lets the GC know that an object
    refers to another one. If the child object is freed, the pointer from
    the parent object is overwritten with `Qundef`.
    
    Co-Authored-By: default avatarJean Boussier <byroot@ruby-lang.org>
    bfb395c6
    Implement weak references in the GC
    Peter Zhu authored
    
    
    [Feature #19783]
    
    This commit adds support for weak references in the GC through the
    function `rb_gc_mark_weak`. Unlike strong references, weak references
    does not mark the object, but rather lets the GC know that an object
    refers to another one. If the child object is freed, the pointer from
    the parent object is overwritten with `Qundef`.
    
    Co-Authored-By: default avatarJean Boussier <byroot@ruby-lang.org>
Loading