Skip to content
Better HN
Top
New
Best
Ask
Show
Jobs
Search
⌘K
0 points
pault
6y ago
0 comments
Share
Does shallow copying have the same issues? For example, `let foo = { x: 1, ...bar }` just makes a new object with references to bar's members.
undefined | Better HN
0 comments
default
newest
oldest
Jasper_
6y ago
Shallow copying will create a new object, and thus, some (small) amount of GC garbage. Less than a deep copy, for sure, which means less frequent pauses, but still garbage to clean up nonetheless.
j
/
k
navigate · click thread line to collapse