зеркало из https://github.com/github/ruby.git
* array.c: don't recycle shared-array while sort!.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
331cd4eed6
Коммит
b29f3640e9
|
@ -1,3 +1,7 @@
|
|||
Sat Oct 18 00:47:51 2008 wanabe <s.wanabe@gmail.com>
|
||||
|
||||
* array.c: don't recycle shared-array while sort!.
|
||||
|
||||
Fri Oct 17 22:04:38 2008 wanabe <s.wanabe@gmail.com>
|
||||
|
||||
* array.c: recycle shared-array when it isn't referenced.
|
||||
|
|
2
array.c
2
array.c
|
@ -177,7 +177,7 @@ rb_ary_decrement_share(VALUE shared)
|
|||
{
|
||||
if (shared) {
|
||||
int num = ARY_SHARED_NUM(shared) - 1;
|
||||
if (num == 0) {
|
||||
if (num == 0 && RBASIC(shared)->klass) {
|
||||
rb_ary_free(shared);
|
||||
rb_gc_force_recycle(shared);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче