Skip to content

Commit 497ae63

Browse files
committed
Replace Set with WeakSet for collecting removed paths
This contains objects and is never traversed, so we might be able to help free us some memory by using a WeakSet here instead of a Set.
1 parent 4bd9ece commit 497ae63

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export default function(api) {
6969
const { template, types, traverse } = api
7070

7171
const nestedIdentifiers = new Set()
72-
const removedPaths = new Set()
72+
const removedPaths = new WeakSet()
7373
const collectNestedIdentifiers = {
7474
Identifier(path) {
7575
if (path.parent.type === 'MemberExpression') {

0 commit comments

Comments
 (0)