Skip to content

Commit

Permalink
Add more description
Browse files Browse the repository at this point in the history
  • Loading branch information
kou authored Jan 17, 2024
1 parent eeb45e1 commit ea8e4bb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/rexml/source.rb
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,8 @@ def read
begin
# NOTE: `@scanner << readline` does not free memory, so when parsing huge XML in JRuby's DOM,
# out-of-memory error `Java::JavaLang::OutOfMemoryError: Java heap space` occurs.
# `@scanner.string = @scanner.rest + readline` frees memory and avoids this problem.
# `@scanner.string = @scanner.rest + readline` frees memory that is already consumed
# and avoids this problem.
@scanner.string = @scanner.rest + readline
rescue Exception, NameError
@source = nil
Expand Down

0 comments on commit ea8e4bb

Please sign in to comment.