author | erik <erik> | 2007-01-19 01:12:38 (UTC) |
---|---|---|
committer | erik <erik> | 2007-01-19 01:12:38 (UTC) |
commit | 1ab92f1d2b346de7da8ca5c3aaa6bc75b43981e7 (patch) (side-by-side diff) | |
tree | af4a12bc46e25853386dc53868b869e1bf05d863 /noncore/apps/opie-write | |
parent | 2b45dc71e79a3eb7d4e8553273c9bc4f4282d50a (diff) | |
download | opie-1ab92f1d2b346de7da8ca5c3aaa6bc75b43981e7.zip opie-1ab92f1d2b346de7da8ca5c3aaa6bc75b43981e7.tar.gz opie-1ab92f1d2b346de7da8ca5c3aaa6bc75b43981e7.tar.bz2 |
Every single file in this commit had a memory leak where a resource is
allocated in the constructor but not de-allocated in the destructor.
This commit fixes that.
-rw-r--r-- | noncore/apps/opie-write/qrichtext.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/noncore/apps/opie-write/qrichtext.cpp b/noncore/apps/opie-write/qrichtext.cpp index c27eb1e..f040f1e 100644 --- a/noncore/apps/opie-write/qrichtext.cpp +++ b/noncore/apps/opie-write/qrichtext.cpp @@ -6062,3 +6062,3 @@ QTextImage::QTextImage( QTextDocument *p, const QMap<QString, QString> &attr, co QMimeSourceFactory &factory ) - : QTextCustomItem( p ) + : QTextCustomItem( p ), reg( 0 ) { @@ -6070,3 +6070,2 @@ QTextImage::QTextImage( QTextDocument *p, const QMap<QString, QString> &attr, co - reg = 0; QString imageName = attr["src"]; @@ -6151,2 +6150,3 @@ QTextImage::~QTextImage() { + delete reg; if ( pixmap_map && pixmap_map->contains( imgId ) ) { @@ -6162,3 +6162,2 @@ QTextImage::~QTextImage() } - delete reg; } |