Promovat
Administrator
Administrator
Mesaje: 5038
Membru din: 07 Aug 2024, 18:53
  • Reacții: 130756
  • Mesaje utile: 47
  • Status: Pe aici.. 🤠
    Discord: Copiază ID
    Server: Saga2 - Soon
  • Regat: Jinno
  • Avatar utilizator - SCOOB
    Administrator
    Administrator
    *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:

    Cod: Selectaţi tot

    CWhisper * CPythonChat::CreateWhisper(const char * c_szName)
    {
        CWhisper * pWhisper = CWhisper::New();
        m_WhisperMap.insert(TWhisperMap::value_type(c_szName, pWhisper));
        return pWhisper;
    }

    Inlocuim cu:
    Conținut: Ascuns
    Reacționează ❤️ la acest mesaj și conținutul se va afișa automat.
    Fii primul care reacționează
    Promovat

    Înapoi la “FIX-uri”

    Informații

    Utilizatori ce navighează pe acest forum: Alex Aranyi și 4 vizitatori

    Promovat
    ID Discord copiat: