fix-some-memory-leaks.patch

Minoru Akagi, 2013-04-22 03:00 AM

Download (2.62 KB)

View differences:

src/core/raster/qgscontrastenhancement.cpp
77 77

  
78 78
QgsContrastEnhancement::~QgsContrastEnhancement()
79 79
{
80
  delete [] mLookupTable;
81
  delete mContrastEnhancementFunction;
80 82
}
81 83
/*
82 84
 *
src/core/raster/qgsrasterinterface.cpp
219 219
        myMean += myDelta / myRasterBandStats.elementCount;
220 220
        mySumOfSquares += myDelta * ( myValue - myMean );
221 221
      }
222
      delete blk;
222 223
    }
223 224
  }
224 225

  
......
478 479
        myHistogram.histogramVector[myBinIndex] += 1;
479 480
        myHistogram.nonNullCount++;
480 481
      }
482
      delete blk;
481 483
    }
482 484
  }
483 485

  
src/core/raster/qgsrasternuller.cpp
50 50
QgsRasterBlock * QgsRasterNuller::block( int bandNo, QgsRectangle  const & extent, int width, int height )
51 51
{
52 52
  QgsDebugMsg( "Entered" );
53
  QgsRasterBlock *outputBlock = new QgsRasterBlock();
54 53
  if ( !mInput )
55 54
  {
55
    QgsRasterBlock *outputBlock = new QgsRasterBlock();
56 56
    return outputBlock;
57 57
  }
58 58

  
src/providers/gdal/qgsgdalprovider.cpp
971 971
    {
972 972
      results.insert( i, value );
973 973
    }
974
    delete myBlock;
974 975
  }
975 976
  return QgsRasterIdentifyResult( QgsRasterDataProvider::IdentifyFormatValue, results );
976 977
}
977
-