chore: trigger gc when the rule is loaded

This commit is contained in:
Skyxim
2023-03-29 22:46:16 +08:00
parent d462257e53
commit 7b7a8981a6
2 changed files with 1 additions and 7 deletions

View File

@ -5,7 +5,6 @@ import (
"net/netip"
"os"
"runtime"
"runtime/debug"
"strings"
"sync"
@ -106,7 +105,7 @@ func ApplyConfig(cfg *config.Config, force bool) {
loadProxyProvider(cfg.Providers)
updateProfile(cfg)
loadRuleProvider(cfg.RuleProviders)
debug.FreeOSMemory()
runtime.GC()
tunnel.OnRunning()
log.SetLevel(cfg.General.LogLevel)
@ -177,7 +176,6 @@ func updateListeners(general *config.General, listeners map[string]C.InboundList
}
func updateExperimental(c *config.Config) {
runtime.GC()
}
func updateDNS(c *config.DNS, ruleProvider map[string]provider.RuleProvider, generalIPv6 bool) {