[Bug #1997] memory leak on redefining method

Bug #1997: memory leak on redefining method
http://redmine.ruby-lang.org/issues/show/1997

e$B5/I<<Te(B: Usaku NAKAMURA
e$B%9%F!<%?%9e(B: Assigned, e$BM%@hEYe(B: Normal
e$BC4Ev<Te(B: Nobuyoshi N., e$B%+%F%4%je(B: core, Target version:
1.9.x
ruby -v: ruby 1.9.2dev (2009-08-26 trunk 24658) [i386-mswin32]

e$B0J2<$N%9%/%j%W%H$,%a%b%j$r$I$s$I$s?)$$$D$V$7$^$9!#e(B

loop do
class C
def foo
end
end
GC.start
end

vm_method.ce$B$Ne(Brb_add_method()e$B$r8+$?$H$3$m!"e(BTODOe$B$rD>$7K:$l$F$k$h$&$G$9!#e(B
e$B$^$?!"e(Bremove_methode$B$G$b%a%b%j$r2rJ|$7$F$J$$$N$G!"F1$8$h$&$K%a%b%j$r?)$$$D$V$9$3$H$,=PMh$=$&$G$9!#e(B

[email protected]$5$s$,[email protected]$r9M$($F$/$l$F$$$k$=$&$J$N$G!"%"%5%$%s$7$H$-$^$9e(B

[email protected]$G$9!#e(B

At Wed, 26 Aug 2009 15:30:50 +0900,
Usaku NAKAMURA wrote in [ruby-dev:39165]:

vm_method.ce$B$Ne(Brb_add_method()e$B$r8+$?$H$3$m!"e(BTODOe$B$rD>$7K:$l$F$k$h$&$G$9!#e(B
e$B$^$?!"e(Bremove_methode$B$G$b%a%b%j$r2rJ|$7$F$J$$$N$G!"F1$8$h$&$K%a%b%j$r?)$$$D$V$9$3$H$,=PMh$=$&$G$9!#e(B

aliase$B$N07$$$,$^$:$=$&[email protected]$C$?$N$G!"$+$J$jBg$-$/$J$C$F$7$^$$$^$7$?!#e(B

  • method_h (rb_method_definition_t): split from rb_method_entry_t.

http://gist.github.com/176200

e$B%A%1%C%He(B #1997 e$B$,99?7$5$l$^$7$?!#e(B (by Nobuyoshi N.)

e$B%9%F!<%?%9e(B Assignede$B$+$ie(BClosede$B$KJQ99e(B
e$B?JD=e(B % 0e$B$+$ie(B100e$B$KJQ99e(B

Applied in changeset r24691.

http://redmine.ruby-lang.org/issues/show/1997

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs