mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-19 21:31:37 +00:00
This commit is contained in:
parent
d75f2822d3
commit
d3e994377b
2 changed files with 2 additions and 0 deletions
|
|
@ -46,6 +46,7 @@ func (h *nonceHeap) Pop() interface{} {
|
|||
old := *h
|
||||
n := len(old)
|
||||
x := old[n-1]
|
||||
old[n-1] = 0 // avoid memory leak
|
||||
*h = old[0 : n-1]
|
||||
return x
|
||||
}
|
||||
|
|
|
|||
|
|
@ -704,6 +704,7 @@ func (s *TxByPriceAndTime) Pop() interface{} {
|
|||
old := s.txs
|
||||
n := len(old)
|
||||
x := old[n-1]
|
||||
old[n-1] = nil // avoid memory leak
|
||||
s.txs = old[0 : n-1]
|
||||
return x
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue