Skip to content

Commit

Permalink
trigger GC after loading
Browse files Browse the repository at this point in the history
  • Loading branch information
DarienRaymond committed Nov 16, 2018
1 parent 248099e commit 1464694
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions main/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"os"
"os/signal"
"path/filepath"
"runtime"
"strings"
"syscall"

Expand Down Expand Up @@ -119,6 +120,9 @@ func main() {
os.Exit(-1)
}

// Explicitly triggering GC to remove garbage from config loading.
runtime.GC()

osSignals := make(chan os.Signal, 1)
signal.Notify(osSignals, os.Interrupt, os.Kill, syscall.SIGTERM)

Expand Down

0 comments on commit 1464694

Please # to comment.