chore: force memory to be released once after rule loading

This commit is contained in:
Skyxim 2023-03-29 22:39:07 +08:00
parent 2e1c5091c3
commit d462257e53

View File

@ -5,6 +5,7 @@ import (
"net/netip"
"os"
"runtime"
"runtime/debug"
"strings"
"sync"
@ -105,7 +106,7 @@ func ApplyConfig(cfg *config.Config, force bool) {
loadProxyProvider(cfg.Providers)
updateProfile(cfg)
loadRuleProvider(cfg.RuleProviders)
debug.FreeOSMemory()
tunnel.OnRunning()
log.SetLevel(cfg.General.LogLevel)