Safebox Memory Leak Fix

Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

frighter

Banned
Banned
Joined
Sep 29, 2019
Messages
19
Credits
8

Find in safebox.cpp

C++:
Expand Collapse Copy
    if (pkOldGrid)
        m_pkGrid = M2_NEW CGrid(pkOldGrid, 5, m_iSize);
    else
        m_pkGrid = M2_NEW CGrid(5, m_iSize);

delete existing block then add next

C++:
Expand Collapse Copy
    if (pkOldGrid) {
        m_pkGrid = M2_NEW CGrid(pkOldGrid, 5, m_iSize);
        delete pkOldGrid;
    }
    else
        m_pkGrid = M2_NEW CGrid(5, m_iSize);
 
Back
Top