Fix memory leak in attack library
This commit is contained in:
		@@ -13,6 +13,9 @@ namespace CreatureLib::Library {
 | 
				
			|||||||
        AttackLibrary() = default;
 | 
					        AttackLibrary() = default;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        ~AttackLibrary(){
 | 
					        ~AttackLibrary(){
 | 
				
			||||||
 | 
					            for (auto attack: _attacks){
 | 
				
			||||||
 | 
					                delete attack.second;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
            _attacks.clear();
 | 
					            _attacks.clear();
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user