diff --git a/source/util/src/tcache.c b/source/util/src/tcache.c index c4e85a425e1c9af3beb8146ca58685756989d067..a69f11f285053922e1625f602c46560c6ef1a1ec 100644 --- a/source/util/src/tcache.c +++ b/source/util/src/tcache.c @@ -910,6 +910,8 @@ void taosCacheRefresh(SCacheObj *pCacheObj, __cache_trav_fn_t fp, void *param1) void taosStopCacheRefreshWorker(void) { stopRefreshWorker = true; + taosThreadJoin(cacheRefreshWorker, NULL); + taosArrayDestroy(pCacheArrayList); } size_t taosCacheGetNumOfObj(const SCacheObj* pCacheObj) {