Cleanups
Make our intent more clear in destruction
This commit is contained in:
		
							parent
							
								
									0f3ec003bb
								
							
						
					
					
						commit
						948f98cf4a
					
				
					 2 changed files with 8 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -1035,9 +1035,12 @@ class basic_json
 | 
			
		|||
                    {
 | 
			
		||||
                        stack.push_back(std::move(it.second));
 | 
			
		||||
                    }
 | 
			
		||||
 | 
			
		||||
                    current_item.m_value.object->clear();
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
                // current_item is destroyed here
 | 
			
		||||
                // it's now safe that current_item get destructed
 | 
			
		||||
                // since it doesn't have any children
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            switch (t)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue