Project

General

Profile

Actions

Bug #20304

closed

Memory leak when setting Encoding.default_internal

Added by MaxLap (Maxime Lapointe) 9 months ago. Updated 4 months ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:116950]

Description

Problem is present in Ruby 3.2.2, 3.2.3, 3.3.0. Didn't check before.

Put this in a file:

10.times do
  100000.times do
    Encoding.default_internal = nil
  end
  puts `ps -o rss= -p #{$$}`.to_i
end

Result:

$ ruby local.rb
27044
30212
33116
36284
39452
42620
45788
48956
51860
55028
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0