[#66126] Creation/Conversion methods/functions table for Ruby types — SASADA Koichi <ko1@...>
Hi,
5 messages
2014/11/07
[#66248] [ruby-trunk - Feature #10423] [PATCH] opt_str_lit*: avoid literal string allocations — normalperson@...
Issue #10423 has been updated by Eric Wong.
3 messages
2014/11/13
[#66595] [ruby-trunk - Bug #10557] [Open] Block not given when the argument is a string — bartosz@...
Issue #10557 has been reported by Bartosz Kopinski.
3 messages
2014/11/30
[ruby-core:66440] [ruby-trunk - Bug #10537] Repeated creation and garbage collection of WeakRef instances against a single object leaks memory
From:
alex@...
Date:
2014-11-24 21:04:28 UTC
List:
ruby-core #66440
Issue #10537 has been updated by Alex Boyd. Getting this: ~~~ irb(main):008:0> a = Object.new => #<Object:0x007fe1b983a278> irb(main):009:0> WeakRef.new a => #<Object:0x007fe1b983a278> irb(main):010:0> WeakRef.new a NotImplementedError: method `==' called on broken T_???(0x10) object (0x007fe1b9842258 flags=0x7fe1b9842270) from /Users/aboyd/projects/ruby-trunk-install/lib/ruby/2.2.0/weakref.rb:87:in `[]=' from /Users/aboyd/projects/ruby-trunk-install/lib/ruby/2.2.0/weakref.rb:87:in `initialize' from (irb):10:in `new' from (irb):10 from bin/irb:11:in `<main>' ~~~ No time to dig in further right now, but I'll update when I do. ---------------------------------------- Bug #10537: Repeated creation and garbage collection of WeakRef instances against a single object leaks memory https://bugs.ruby-lang.org/issues/10537#change-50068 * Author: Alex Boyd * Status: Open * Priority: Normal * Assignee: * Category: lib * Target version: * ruby -v: ruby 2.2.0dev (2014-11-24 trunk 48552) [x86_64-darwin14] * Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN ---------------------------------------- ~~~ require 'weakref' a = Object.new 1_000_000.times do WeakRef.new a end GC.start ~~~ The above results in Ruby consuming ~150 MB of RAM, all of which can only be freed by dropping `a`. This should not be the case - an object being weakly referenced should not itself hold a reference to the WeakRef (or any associated data) pointing at it. -- https://bugs.ruby-lang.org/