haxetink / tink_pure

Pure immutable data.
MIT License
10 stars 7 forks source link

Mapping leaks memory #13

Open gene-pavlovsky opened 4 years ago

gene-pavlovsky commented 4 years ago

It would be nice to see Mapping improve one day. Currently it leaks memory when a same key is added to it. E.g. this code would result in a mapping that works correctly, but it's underlying list has 4 elements:

        var m:Mapping<String, String> = null;
        m = m.with("a", "1");
        m = m.with("b", "2");
        m = m.with("a", "3");
        m = m.with("a", "4");