ppcsuite / ppcd-old

An alternative full node peercoin implementation written in Go (golang)
ISC License
3 stars 2 forks source link

Is not stopped ticker in queueHandler causing a memory leak? #11

Closed mably closed 9 years ago

mably commented 9 years ago

From @mably on December 3, 2014 23:34

Source code: https://github.com/mably/ppcd/blob/master/peer.go#L1606

Profiling charts: http://www.mably.com/dev/ppcd/prof/2014-12-04/

"NewTicker returns a new Ticker containing a channel that will send the time with a period specified by the duration argument. It adjusts the intervals or drops ticks to make up for slow receivers. The duration d must be greater than zero; if not, NewTicker will panic. Stop the ticker to release associated resources."

Documentation: http://golang.org/pkg/time/#NewTicker

Related forum post: https://groups.google.com/forum/#!topic/golang-nuts/Chx1tCs2QGg

Copied from original issue: mably/ppcd#14

mably commented 9 years ago

Fixed by commit 9c0db2f7fde54ac535a2e9797b8c0131550809af