Uploaded image for project: 'C++ Standard Library'
  1. C++ Standard Library
  2. STDCXX-577

purify reports leaked memory in stocks example

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 4.2.0
    • 4.2.1
    • Examples
    • None
    • Patch Available
    • Incorrect Behavior

    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.

      Attachments

        1. stocks.log
          14 kB
          Travis Vitek
        2. stocks-valgrind.log
          2 kB
          Martin Sebor
        3. stdcxx-577.patch
          5 kB
          Travis Vitek

        Activity

          People

            vitek Travis Vitek
            vitek Travis Vitek
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: