summaryrefslogtreecommitdiff
path: root/spec/ruby/core
diff options
context:
space:
mode:
authorNARUSE, Yui <nurse@users.noreply.github.com>2024-03-22 09:25:36 +0900
committerGitHub <noreply@github.com>2024-03-22 00:25:36 +0000
commita24802e8fd7e05077256605885c82ffd8221bc94 (patch)
tree7dbe2c8d0fb866dd8a21435c23b842e0996ca7df /spec/ruby/core
parenteb7cb164cffc86b63d2e2528c73e160c33b7a2e5 (diff)
merge revision(s) c7ce2f537f96ab2cf2f5fc2982d6147866ff5340: [Backport #20304] (#10311)
Fix memory leak in setting encodings There is a memory leak in Encoding.default_external= and Encoding.default_internal= because the duplicated name is not freed when overwriting. 10.times do 1_000_000.times do Encoding.default_internal = nil end puts `ps -o rss= -p #{$$}` end Before: 25664 41504 57360 73232 89168 105056 120944 136816 152720 168576 After: 9648 9648 9648 9680 9680 9680 9680 9680 9680 9680
Diffstat (limited to 'spec/ruby/core')
0 files changed, 0 insertions, 0 deletions