diff --git a/native/cocos/renderer/CCTextureCache.cpp b/native/cocos/renderer/CCTextureCache.cpp index e377d514e6..30ef33b4fe 100644 --- a/native/cocos/renderer/CCTextureCache.cpp +++ b/native/cocos/renderer/CCTextureCache.cpp @@ -572,6 +572,9 @@ void TextureCache::waitForQuit() _needQuit = true; _sleepCondition.notify_one(); if (_loadingThread) _loadingThread->join(); + + // Clear async tasks which are still in the queue. + addImageAsyncCallBack(0.0f); } std::string TextureCache::getCachedTextureInfo() const