Fix memory leak (#300)
Free memory allocated to temp before returning from the function.
This commit is contained in:
		@@ -558,6 +558,7 @@ void StandardCalculatorViewModel::HandleUpdatedOperandData(Command cmdenum)
 | 
				
			|||||||
            length = m_selectedExpressionLastData->Length() + 1;
 | 
					            length = m_selectedExpressionLastData->Length() + 1;
 | 
				
			||||||
            if (length > 50)
 | 
					            if (length > 50)
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
 | 
					                delete [] temp;
 | 
				
			||||||
                return;
 | 
					                return;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            for (; i < length; ++i)
 | 
					            for (; i < length; ++i)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user