commit | 446005a26a386987f826965c8fa07e9ca10ec9b5 | [log] [tgz] |
---|---|---|
author | Steve Yen <steve.yen@gmail.com> | Thu Nov 07 06:31:09 2013 |
committer | Steve Yen <steve.yen@gmail.com> | Thu Nov 07 06:31:09 2013 |
tree | ea724f5d358da28adaf60d00a56ba0e160db5838 | |
parent | aa7cdd084b87c1debf8c6f4b8cdbb294978771e0 [diff] |
mkNode() does ItemValAddRef().
diff --git a/alloc.go b/alloc.go index 3da2543..fc80176 100644 --- a/alloc.go +++ b/alloc.go
@@ -100,6 +100,12 @@ allocStats.CurFreeNodes-- freeNodeLock.Unlock() } + if itemIn != nil { + i := itemIn.Item() + if i != nil { + t.store.ItemValAddRef(t, i) + } + } n.item.Copy(itemIn) n.left.Copy(leftIn) n.right.Copy(rightIn)