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

purify reports leaked memory in stocks example

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.2.0
    • Fix Version/s: 4.2.1
    • Component/s: Examples
    • Labels:
      None
    • Patch Info:
      Patch Available
    • Severity:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: