mirror of
				https://github.com/Z3Prover/z3
				synced 2025-11-04 13:29:11 +00:00 
			
		
		
		
	simplify ~context #1948
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
		
							parent
							
								
									796689f708
								
							
						
					
					
						commit
						a3f9e3168d
					
				
					 1 changed files with 3 additions and 6 deletions
				
			
		| 
						 | 
				
			
			@ -109,13 +109,10 @@ namespace api {
 | 
			
		|||
 | 
			
		||||
    context::~context() {
 | 
			
		||||
        m_last_obj = nullptr;
 | 
			
		||||
        u_map<api::object*>::iterator it = m_allocated_objects.begin();
 | 
			
		||||
        while (it != m_allocated_objects.end()) {
 | 
			
		||||
            api::object* val = it->m_value;
 | 
			
		||||
            DEBUG_CODE(warning_msg("Uncollected memory: %d: %s", it->m_key, typeid(*val).name()););
 | 
			
		||||
            m_allocated_objects.remove(it->m_key);
 | 
			
		||||
        for (auto& kv : m_allocated_objects) {
 | 
			
		||||
            api::object* val = kv.m_value;
 | 
			
		||||
            DEBUG_CODE(warning_msg("Uncollected memory: %d: %s", kv.m_key, typeid(*val).name()););
 | 
			
		||||
            dealloc(val);
 | 
			
		||||
            it = m_allocated_objects.begin();
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue