Fix: Memory leak in resolveCache #81
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "master"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This pull request addresses two main issues:
resolveCache.Did this (bounded) leak cause any practical issue for you, or is this more of theoretical fix?
Yes, this leak did cause my problem. The cached doc contains nodeTypes and their schemas. When I declared them, I injected my own context. This context is widely used within closures. The cached data stored here is not garbage collected, and all closures containing the context are not garbage collected either. In my case, a lot of things were leaked.
Merged your type changes as
cde085e345, and applied an alternative patch for the cache issue —54de8c0752, which doesn't allow cached positions to accumulate endlessly for a given document.Pull request closed