From 7c854ad1b909f37c7314ef4ac2061500d02af16d Mon Sep 17 00:00:00 2001 From: simon Date: Sat, 14 Dec 2002 18:18:20 +0000 Subject: - reduce memory usage a little bit by not storing the images after they got converted to pixmaps --- (limited to 'noncore/multimedia/opieplayer2/skin.cpp') diff --git a/noncore/multimedia/opieplayer2/skin.cpp b/noncore/multimedia/opieplayer2/skin.cpp index a8f4ae9..44f5ca2 100644 --- a/noncore/multimedia/opieplayer2/skin.cpp +++ b/noncore/multimedia/opieplayer2/skin.cpp @@ -77,11 +77,15 @@ Skin::Skin( const QString &fileNameInfix ) Skin::~Skin() { - SkinCache::self().store( m_skinPath, m_fileNameInfix, d ); + if ( m_isCachable ) + SkinCache::self().store( m_skinPath, m_fileNameInfix, d ); + else + delete d; } void Skin::init( const QString &name ) { + m_isCachable = true; m_skinPath = "opieplayer2/skins/" + name; d = SkinCache::self().lookupAndTake( m_skinPath, m_fileNameInfix ); } -- cgit v0.9.0.2