properly release memory
fix https://github.com/chrislusf/seaweedfs/issues/301
This commit is contained in:
@@ -66,7 +66,9 @@ func getBytesForFileBlock(r *os.File, offset int64, readSize int) (dataSlice []b
|
||||
}
|
||||
|
||||
func (n *Needle) ReleaseMemory() {
|
||||
n.rawBlock.decreaseReference()
|
||||
if n.rawBlock != nil {
|
||||
n.rawBlock.decreaseReference()
|
||||
}
|
||||
}
|
||||
func ReleaseBytes(b []byte) {
|
||||
bytesPool.Put(b)
|
||||
|
||||
Reference in New Issue
Block a user