*Descriere:
Rezolva un mem leak la functia
CreateWhisper:
std: map :insert() does nothing when the key already exists. So every time CreateWhisper was called for an existing name (e.g. reopening a whisper window), a new CWhisper was allocated but never stored in the
map and never freed — classic memory leak.
*Link download / Code:
Cautam:
CWhisper * CPythonChat::CreateWhisper(const char * c_szName)
{
CWhisper * pWhisper = CWhisper::New();
m_WhisperMap.insert(TWhisperMap::value_type(c_szName, pWhisper));
return pWhisper;
}
Inlocuim cu:
Reacționează

la acest mesaj și conținutul se va afișa automat.