Perform path compression upon network removal to avoid memory leak over time (#21)
##Summary Investigated memory leak symptoms reported in #15 , and turns out path compression upon removal of networks was not implemented correctly, instead, it simply did a parent child reassignment. Added to unit testing to prove desired behavior and added a memory leak unit test using a slightly modified version of the test used to uncover the problem in #15 , use -short flag in local testing to skip added slow test, as documented by https://golang.org/pkg/testing/#Short
Showing
... | ... | @@ -2,8 +2,4 @@ module github.com/yl2chen/cidranger |
go 1.13 | ||
require ( | ||
github.com/davecgh/go-spew v1.1.0 // indirect | ||
github.com/pmezard/go-difflib v1.0.0 // indirect | ||
github.com/stretchr/testify v1.2.1 | ||
) | ||
require github.com/stretchr/testify v1.4.0 |
Please register or sign in to comment