Memory Leak Fixes: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
m (→FileOpenDialog) |
||
Line 25: | Line 25: | ||
506a507 | 506a507 | ||
> kv->deleteThis(); | > kv->deleteThis(); | ||
[[Category:Programming]] | [[Category:Debugging]] [[Category:Feedback]] [[Category:Programming]] [[Category:Source SDK FAQ]] |
Revision as of 21:10, 11 January 2006
On this page goes fixes for memory leaks in the SDK.
CPanelMetaClassMgrImp
src\cl_dll\panelmetaclassmgr.cpp 236a237,241 > while(m_MetaClassKeyValues.Count()>0) > { > m_MetaClassKeyValues[0]->deleteThis(); > } > m_MetaClassKeyValues.RemoveAll();
DirectorySelectDialog
src\vgui2\controls\DirectorySelectDialog.cpp 258c258,260 < int rootIndex = m_pDirTree->AddItem(new KeyValues("root", "Text", m_szCurrentDrive), -1); --- > KeyValues *kv = new KeyValues("root", "Text", m_szCurrentDrive); > int rootIndex = m_pDirTree->AddItem(kv, -1); > kv->deleteThis(); 294a297 > kv->deleteThis(); 410a414 > kv->deleteThis();
FileOpenDialog
src\vgui2\controls\FileOpenDialog.cpp 506a507 > kv->deleteThis();