Skip to content

Commit

Permalink
changed type of rootContextCache to WeakMap
Browse files Browse the repository at this point in the history
Since there are some problems with garbage collection in the rootContextCache, it could easily mitigated by using a WeakMap.
  • Loading branch information
svennergr authored Jun 13, 2019
1 parent 9ab5501 commit 465d567
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/Context.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { GUARDED_NOOP, once, invariant, isAssignableTo } from "../utils/utils"

var rootContextCache = new Map()
var rootContextCache = new WeakMap()

export default function Context(parentContext, modelSchema, json, onReadyCb, customArgs) {
this.parentContext = parentContext
Expand Down

0 comments on commit 465d567

Please sign in to comment.