-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Before this commit we use Rc cycles to represent the forest's trees, but this creates some floating Rc's that never gets dropped, yelding a memory leak. This commit fixes this by using Weak references everywhere except for a node's children, since the node is meant to be owned by it's ancestor. It is ok to upgrade those Weak references because they will never outlive the node itself.
- Loading branch information
1 parent
fdabb1e
commit 005107e
Showing
1 changed file
with
65 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters