mirror of https://github.com/BOINC/boinc.git
Use the WX_CLEAR_HASH_TABLE macro to clear the notices hash table
This commit is contained in:
parent
2ceec2926e
commit
58e0757e1d
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue