Skip to content

Commit

Permalink
Replace Set with WeakSet for collecting removed paths
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
lencioni committed Aug 23, 2018
1 parent 4bd9ece commit 497ae63
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.js
Expand Up @@ -69,7 +69,7 @@ export default function(api) {
const { template, types, traverse } = api

const nestedIdentifiers = new Set()
const removedPaths = new Set()
const removedPaths = new WeakSet()
const collectNestedIdentifiers = {
Identifier(path) {
if (path.parent.type === 'MemberExpression') {
Expand Down

0 comments on commit 497ae63

Please sign in to comment.