зеркало из https://github.com/github/ruby.git
* vm_method.c (rb_add_method_def): decrement alias count of
rb_method_definition_t to prevent memory leak. see [ruby-dev:41021]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27421 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
ef3ea2dd89
Коммит
3728ec6ea3
|
@ -1,3 +1,9 @@
|
|||
Wed Apr 21 00:01:05 2010 Yusuke Endoh <mame@tsg.ne.jp>
|
||||
|
||||
* vm_method.c (rb_add_method_def): decrement alias count of
|
||||
rb_method_definition_t to prevent memory leak. see
|
||||
[ruby-dev:41021].
|
||||
|
||||
Tue Apr 20 21:33:06 2010 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||
|
||||
* ext/dl/win32/lib/win32/registry.rb (PredefinedKey#create): root key
|
||||
|
|
|
@ -215,6 +215,14 @@ rb_add_method_def(VALUE klass, ID mid, rb_method_type_t type, rb_method_definiti
|
|||
* another problem when the usage is changed.
|
||||
*/
|
||||
me = old_me;
|
||||
|
||||
if (me->def) {
|
||||
if (me->def->alias_count == 0)
|
||||
xfree(me->def);
|
||||
else if (me->def->alias_count > 0)
|
||||
me->def->alias_count--;
|
||||
me->def = 0;
|
||||
}
|
||||
}
|
||||
else {
|
||||
me = ALLOC(rb_method_entry_t);
|
||||
|
|
Загрузка…
Ссылка в новой задаче