lib/memdump/memory_dump.rb
# Remove entries from the dump, and all references to them
#
# @param [MemoryDump] the set of entries to remove, as e.g. returned by
#   {#objects_of_class}
# @return [MemoryDump] the filtered dump
Remove entries from the dump, and all references to them
Remove entries from the dump and all references to them
def without(entries)
            find_and_map do |record|
                next if entries.include?(record['address'])
                record_refs = record['references']
                references = record_refs.find_all { |r| !entries.include?(r) }
                if references.size != record_refs.size
                    record = record.dup
                    record['references'] = references.to_set
                end
                record
            end
        end
def without ( entries ) find_and_map do | record | next if entries . include? ( record [ 'address' ] ) record_refs = record [ 'references' ] references = record_refs . find_all { | r | ! entries . include? ( r ) } if references . size != record_refs . size record = record . dup record [ 'references' ] = references . to_set end record end end
Remove entries from the dump, and all references to them
Remove entries from the dump and all references to them
the filtered dump
the filtered dump
MemoryDump
entries
the set of entries to remove, as e.g. returned by {#objects_of_class}
the set of entries to remove as e . g . returned by { #objects_of_class }