Details
Description
It is pretty obvious from looking at the source that memory is being leaked. The destructor for StockXchange doesn't deallocate memory allocated in StockXchange::add(), and the sl_pairs allocated in main are never deallocated.
It is pretty obvious from looking at the source that memory is being leaked. The destructor for StockXchange doesn't deallocate memory allocated in StockXchange::add(), and the sl_pairs allocated in main are never deallocated.