Implemented automatic memory leak detection and reporting for CRT.
This commit is contained in:
+17
-4
@@ -18,8 +18,8 @@ std::vector<MenuComponent*>Menu::unhandledComponents;
|
||||
///__/////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//| |////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//| |/////WARNING! If you are adding something here you likely are adding another container with MenuComponent pointers in it right now.
|
||||
//| |/////Because we are handling raw pointers, you must also add this container to the list of iterating search removal contains that occur in the
|
||||
//| |/////DESTRUCTOR of MenuComponents!!!!! THIS IS NOT A DRILL!
|
||||
//| |/////Because we are handling raw pointers, you must also add this container to the list of iterating search removal containers that occur in the
|
||||
//| |/////DESTRUCTOR of MenuComponents!!!!! (Go to MenuComponent::~MenuComponent()) THIS IS NOT A DRILL!
|
||||
//|__|////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
///__/////////////////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -648,5 +648,18 @@ bool Menu::IsMenuOpen(){
|
||||
}
|
||||
|
||||
void Menu::CleanupAllMenus(){
|
||||
|
||||
}
|
||||
for(auto key:Menu::menus){
|
||||
Menu*menu=key.second;
|
||||
for(auto componentKey:menu->components){
|
||||
MenuComponent*component=componentKey.second;
|
||||
component->Cleanup();
|
||||
delete component;
|
||||
}
|
||||
menu->components.Reset();
|
||||
menu->Cleanup();
|
||||
delete menu;
|
||||
}
|
||||
Menu::menus.clear();
|
||||
}
|
||||
|
||||
void Menu::Cleanup(){}
|
||||
Reference in New Issue
Block a user