优化定时器

This commit is contained in:
boyce
2020-10-28 11:30:22 +08:00
parent 019989fe2c
commit 7de290b553
5 changed files with 24 additions and 17 deletions

View File

@@ -128,11 +128,11 @@ func (slf *Module) ReleaseModule(moduleId int64){
pModule.self.OnRelease()
log.Debug("Release module %s.",slf.GetModuleName())
for pTimer,_ := range pModule.mapActiveTimer {
pTimer.Stop()
pTimer.Close()
}
for pCron,_ := range pModule.mapActiveCron {
pCron.Stop()
pCron.Close()
}
delete(slf.child,moduleId)