diff options
author | Ben Johnson <benbjohnson@yahoo.com> | 2014-05-09 10:02:13 -0600 |
---|---|---|
committer | Ben Johnson <benbjohnson@yahoo.com> | 2014-05-09 10:02:13 -0600 |
commit | 4b56f820bc6b6fbd1720acb005de0122b2f90544 (patch) | |
tree | 058209a444636914495eaa47621d7811a11156c0 /bucket.go | |
parent | Fix node unit tests. (diff) | |
parent | Merge branch 'master' of https://github.com/boltdb/bolt into fix-deletion (diff) | |
download | dedo-4b56f820bc6b6fbd1720acb005de0122b2f90544.tar.gz dedo-4b56f820bc6b6fbd1720acb005de0122b2f90544.tar.xz |
Merge pull request #160 from benbjohnson/fix-deletion
Fix deletion & dereferencing.
Diffstat (limited to 'bucket.go')
-rw-r--r-- | bucket.go | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -591,16 +591,13 @@ func (b *Bucket) free() { // dereference removes all references to the old mmap. func (b *Bucket) dereference() { - for _, n := range b.nodes { - n.dereference() + if b.rootNode != nil { + b.rootNode.dereference() } for _, child := range b.buckets { child.dereference() } - - // Update statistics - b.tx.stats.NodeDeref += len(b.nodes) } // pageNode returns the in-memory node, if it exists. |