Merge: Remove memory leak in Ropes
authorJean Privat <jean@pryen.org>
Mon, 3 Aug 2015 18:25:15 +0000 (14:25 -0400)
committerJean Privat <jean@pryen.org>
Mon, 3 Aug 2015 18:25:15 +0000 (14:25 -0400)
commit8313dff25fddc2c3d47b280c51b2d917cd48d9a6
treec02316aacac31e6459425e98c15f092d19077114
parent9a21334ed1dcbab7a3aa0bde53c841b4febd4b60
parentd5872a371b27c10677c3a97a6c14b7822f236070
Merge: Remove memory leak in Ropes

Early on, the `to_s` of a RopeBuffer was calling `dump_buffer`, which like to double the size of the buffered part after persisting.

By doing do, a simple program like the one submitted along with this PR was consuming an awful lot of RAM, which has the undesirable side-effect of freezing my machine after a few milliseconds of run.

By replacing it with the more memory-friendly `persist buffer`, all my troubles seem so far away !

Pull-Request: #1598
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Romain Chanoir <chanoir.romain@courrier.uqam.ca>
lib/standard/text/ropes.nit