Commit 70f81320 authored by Makayla Shepherd's avatar Makayla Shepherd
Browse files

Fixed a memory leak in jigsaw and qnet. Fixes #4890.

git-svn-id: http://subversion.wr.usgs.gov/repos/prog/isis3/trunk@7758 41f8697f-d340-4b68-9986-7bafba869bb8
parent 44e80101
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -192,9 +192,6 @@ namespace Isis {
        }

        if (projection->IsEquatorialCylindrical()) {

          delete shapeModelCube;

          // If the EquatorialCylindricalShape constructor throws an error or returns null, the
          // following exception will be appended to the fileError. (Later added to the finalError)
          QString msg = "Unable to construct a DEM shape model from the given "
@@ -231,6 +228,8 @@ namespace Isis {
          fileError.append(IException(IException::Unknown, msg, _FILEINFO_));
        }
        
        delete shapeModelCube;

      }

      // in case no error was thrown, but DSK, Equatorial, or DEM constructor returned NULL
+4 −2
Original line number Diff line number Diff line
@@ -43,6 +43,8 @@ namespace Isis {
   *   @history 2017-05-19 Christopher Combs - Modified unitTest.cpp: added ReportError method to
   *                           truncate paths before data directory. Allows test to pass when not
   *                           using the default data area. Fixes #4738.
   *   @history 2017-06-08 Makayla Shepherd - Added a cube pointer deletion to fix a memory leak.
   *                           Fixes #4890.
   */
  class ShapeModelFactory {
    public: