Commit 58e0757e authored by Charlie Fenton's avatar Charlie Fenton Committed by Oliver Bock

Use the WX_CLEAR_HASH_TABLE macro to clear the notices hash table

parent 2ceec292
......@@ -7833,8 +7833,7 @@ Rom 20 Dec 2012
Charlie 21 Dec 2012
- Mgr: If network activity is suspended, don't retrieve URL references within
notices unless they are already in our cache or in the Windows cache.
- Mgr: Clear our internal Internet cache when selecting a different computer;
when removing entries from hash table, delete data to avoid memory leaks.
- Mgr: Clear our internal Internet cache when selecting a different computer.
- Mgr: Display a message and "Retry now" button if some images or other items
within notices failed to load from the Internet; if network activity is
suspended, say so in the message.
......
......@@ -639,18 +639,7 @@ void CBOINCInternetFSHandler::UnchacheMissingItems() {
void CBOINCInternetFSHandler::ClearCache() {
m_Hash->BeginFind();
wxHashTable::Node* node = m_Hash->Next();
for(;;) {
if (node == NULL) break; // End of cache
MemFSHashObj* obj = (MemFSHashObj*)node->GetData();
// We must get next node before deleting this one
node = m_Hash->Next();
if (obj->m_Data) {
delete[] obj->m_Data;
}
m_Hash->Delete(obj->m_Key);
}
WX_CLEAR_HASH_TABLE(*m_Hash);
m_bMissingItems = false;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment