dave08
02/13/2018, 5:46 PMnew HashMap() {{ put("this", true) }}; == mapOf("this" to true) (note the double {{)?araqnid
02/13/2018, 6:10 PMdave08
02/13/2018, 6:17 PMCzar
02/13/2018, 7:10 PM{{ }} in frequently executed code. Each time anonymous class is created, in the days of PermGenSpace this would kill a lot of apps, nowdays it will probably just cause a slow growing memory hog which could potentially cause OutOfMemory error down the line. I think {{ }} should only be allowed during app initialization (which would ensure that only finite number of anonymous classes are generated) and nowhere else.Czar
02/13/2018, 7:13 PMaraqnid
02/13/2018, 7:14 PMmapOf(...) instead; at least, I hope so 😉Czar
02/13/2018, 7:15 PMdave08
02/13/2018, 7:39 PMdave08
02/13/2018, 8:28 PM