summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-reader/StyleConsts.h
authorerik <erik>2007-01-19 01:12:38 (UTC)
committer erik <erik>2007-01-19 01:12:38 (UTC)
commit1ab92f1d2b346de7da8ca5c3aaa6bc75b43981e7 (patch) (side-by-side diff)
treeaf4a12bc46e25853386dc53868b869e1bf05d863 /noncore/apps/opie-reader/StyleConsts.h
parent2b45dc71e79a3eb7d4e8553273c9bc4f4282d50a (diff)
downloadopie-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.
Diffstat (limited to 'noncore/apps/opie-reader/StyleConsts.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-reader/StyleConsts.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/noncore/apps/opie-reader/StyleConsts.h b/noncore/apps/opie-reader/StyleConsts.h
index 4b7ff4b..5fd9669 100644
--- a/noncore/apps/opie-reader/StyleConsts.h
+++ b/noncore/apps/opie-reader/StyleConsts.h
@@ -18,21 +18,19 @@ struct GraphicLink
unsigned long link;
GraphicLink(QImage* p, bool isLnk, unsigned long tgt) :
graphic(p), isLink(isLnk), link(tgt) {}
~GraphicLink();
};
-struct pmstore
+class pmstore
{
+ public:
unsigned int count;
bool m_isScaleable;
GraphicLink* graphic;
- pmstore(bool _canScale, QImage* p, bool isLnk, unsigned long tgt) : count(1), m_isScaleable(_canScale)
- {
- graphic = new GraphicLink(p, isLnk, tgt);
- }
+ pmstore(bool _canScale, QImage* p, bool isLnk, unsigned long tgt);
~pmstore();
};
enum EalignmentType
{
m_AlignLeft,