U:RDoc::AnyMethod[iI"reachable_objects_from:ETI"(ObjectSpace::reachable_objects_from;TT: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::List: @type: LABEL: @items[o:RDoc::Markup::ListItem: @label[I"MRI specific feature;T; [o:RDoc::Markup::Paragraph; [I"-Return all reachable objects from `obj'.;To:RDoc::Markup::BlankLineo;; [I":This method returns all reachable objects from `obj'.;T@o;; [I"OIf `obj' has two or more references to the same object `x', then returned ;TI"(array only includes one `x' object.;T@o;; [I"KIf `obj' is a non-markable (non-heap management) object such as true, ;TI"Mfalse, nil, symbols and Fixnums (and Flonum) then it simply returns nil.;T@o;; [ I"QIf `obj' has references to an internal object, then it returns instances of ;TI"PObjectSpace::InternalObjectWrapper class. This object contains a reference ;TI"Nto an internal object and you can check the type of internal object with ;TI"`type' method.;T@o;; [I"QIf `obj' is instance of ObjectSpace::InternalObjectWrapper class, then this ;TI"Kmethod returns all reachable object from an internal object, which is ;TI"pointed by `obj'.;T@o;; [I"1With this method, you can find memory leaks.;T@o;; [I"=This method is only expected to work except with C Ruby.;T@o;; [I" Example:;To:RDoc::Markup::Verbatim; [I"9ObjectSpace.reachable_objects_from(['a', 'b', 'c']) ;TI" #=> [Array, 'a', 'b', 'c'] ;TI" ;TI"9ObjectSpace.reachable_objects_from(['a', 'a', 'a']) ;TI"K#=> [Array, 'a', 'a', 'a'] # all 'a' strings have different object id ;TI" ;TI"9ObjectSpace.reachable_objects_from([v = 'a', v, v]) ;TI"#=> [Array, 'a'] ;TI" ;TI"+ObjectSpace.reachable_objects_from(1) ;TI"6#=> nil # 1 is not markable (heap managed) object;T: @format0: @fileI"ext/objspace/objspace.c;T:0@omit_headings_from_table_of_contents_below0I"=ObjectSpace.reachable_objects_from(obj) -> array or nil ;T0[I" (p1);T@AFI"ObjectSpace;TcRDoc::NormalModule00