Add autoreleasepool to cache thread
The cache thread should have an autoreleasepool around the release loop, because it will be freeing Objective C objects periodically. Signed-off-by: Christopher Snowhill <kode54@gmail.com>CQTexperiment
parent
da4630f4c5
commit
c8d8e759bc
|
@ -108,7 +108,7 @@ static void cache_run() {
|
|||
while(Cache_Running) {
|
||||
std::chrono::steady_clock::time_point now = std::chrono::steady_clock::now();
|
||||
|
||||
{
|
||||
@autoreleasepool {
|
||||
std::lock_guard<std::mutex> lock(Cache_Lock);
|
||||
for(auto it = Cache_List.begin(); it != Cache_List.end();) {
|
||||
auto elapsed = std::chrono::duration_cast<std::chrono::seconds>(now - it->second.time_accessed);
|
||||
|
|
Loading…
Reference in New Issue