Comments (4)
Absolutely. Good catch! I will fix this.
from fast_immutable_collections.
Done. Note just the IMap had this problem. IList and ISet where created differently. Thank you.
from fast_immutable_collections.
@marcglasberg Can you explain why IList and ISet don't have this issue?
Both IList.fromJson
and ISet.fromJson
use their default constructors to create their respective collections which AFAIK does create copies unlike ISet.unsafe
and IList.unsafe
.
from fast_immutable_collections.
IMap
is creating a map first, and then locking it.
But IList
and ISet
are not. For those you have an Iterable
, and then you lock it directly. The Iterable is lazy, it will be used internally when creating the IList/ISet. No intermediary mutable List
or Set
s are created in this case.
from fast_immutable_collections.
Related Issues (20)
- type 'String' is not a subtype of type 'Enum' in type cast HOT 4
- Add firstWhereOrNull and lastWhereOrNull HOT 2
- App crashes when evaluating `toIList` expression in IntelliJ or VSCode using debugger HOT 4
- `averageBy`'s documentation code is that of `sumBy` HOT 1
- Dart Error: error: illegal recursive type 'IMap<C1X0, C1X1>' HOT 2
- IList.update HOT 1
- Resolve warnings pointed out by dart analyzer HOT 9
- Use of Fast Immutable Collections with Freezed results in dynamic types HOT 4
- Const constructors? HOT 1
- Add `firstWhereOrNull` method HOT 1
- Incompatible with json_serializable toJson/fromJson: issue _safeKeyFromJson HOT 2
- Can Tuple2 be removed with Dart 3.0 now having Records? HOT 5
- IListConst when empty has not type HOT 3
- Suggestion: Use `@useResult` instead of `@useCopy` (or use both) HOT 1
- IHashMap Implementation HOT 3
- What is the most straightforward way to replace an item on an ISet? HOT 1
- IList `replaceFirstWhere` unnecessary nullable HOT 4
- Best Practices for Mutating Collections Multiple Times HOT 1
- Sliding
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fast_immutable_collections.