mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
Call QgsRasterBlock destructor from SIP (add factory)
Fixes #31343 memory leak
This commit is contained in:
parent
9ae5ff5c52
commit
631ac63e57
@ -51,7 +51,7 @@ Factory method to create a new renderer
|
||||
virtual void writeXml( QDomDocument &doc, QDomElement &parentElem ) const;
|
||||
|
||||
|
||||
virtual QgsRasterBlock *block( int bandNo, const QgsRectangle &extent, int width, int height, QgsRasterBlockFeedback *feedback = 0 );
|
||||
virtual QgsRasterBlock *block( int bandNo, const QgsRectangle &extent, int width, int height, QgsRasterBlockFeedback *feedback = 0 ) /Factory/;
|
||||
|
||||
|
||||
virtual QList<int> usesBands() const;
|
||||
|
@ -152,7 +152,7 @@ Read band offset for raster value
|
||||
%End
|
||||
|
||||
|
||||
virtual QgsRasterBlock *block( int bandNo, const QgsRectangle &boundingBox, int width, int height, QgsRasterBlockFeedback *feedback = 0 );
|
||||
virtual QgsRasterBlock *block( int bandNo, const QgsRectangle &boundingBox, int width, int height, QgsRasterBlockFeedback *feedback = 0 ) /Factory/;
|
||||
|
||||
%Docstring
|
||||
Read block of data using given extent and size.
|
||||
|
@ -58,7 +58,7 @@ class CORE_EXPORT QgsHillshadeRenderer : public QgsRasterRenderer
|
||||
|
||||
void writeXml( QDomDocument &doc, QDomElement &parentElem ) const override;
|
||||
|
||||
QgsRasterBlock *block( int bandNo, const QgsRectangle &extent, int width, int height, QgsRasterBlockFeedback *feedback = nullptr ) override;
|
||||
QgsRasterBlock *block( int bandNo, const QgsRectangle &extent, int width, int height, QgsRasterBlockFeedback *feedback = nullptr ) override SIP_FACTORY;
|
||||
|
||||
QList<int> usesBands() const override;
|
||||
|
||||
|
@ -229,7 +229,7 @@ class CORE_EXPORT QgsRasterDataProvider : public QgsDataProvider, public QgsRast
|
||||
// TODO: remove or make protected all readBlock working with void*
|
||||
|
||||
//! Read block of data using given extent and size.
|
||||
QgsRasterBlock *block( int bandNo, const QgsRectangle &boundingBox, int width, int height, QgsRasterBlockFeedback *feedback = nullptr ) override;
|
||||
QgsRasterBlock *block( int bandNo, const QgsRectangle &boundingBox, int width, int height, QgsRasterBlockFeedback *feedback = nullptr ) override SIP_FACTORY;
|
||||
|
||||
//! Returns TRUE if source band has no data value
|
||||
virtual bool sourceHasNoDataValue( int bandNo ) const { return mSrcHasNoDataValue.value( bandNo - 1 ); }
|
||||
|
Loading…
x
Reference in New Issue
Block a user