mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Janitor : Release memory to make it easier to detect memory leaks
This commit is contained in:
parent
0bf782147a
commit
5fc576b8f3
@ -153,6 +153,9 @@ RiaApplication::RiaApplication()
|
||||
RiaApplication::~RiaApplication()
|
||||
{
|
||||
delete m_preferences;
|
||||
delete m_project;
|
||||
|
||||
RiaFontCache::clear();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -129,3 +129,11 @@ RiaFontCache::FontSize RiaFontCache::fontSizeEnumFromPointSize( int pointSize )
|
||||
}
|
||||
return closestEnumValue;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiaFontCache::clear()
|
||||
{
|
||||
ms_fonts.clear();
|
||||
}
|
||||
|
@ -56,6 +56,8 @@ public:
|
||||
static int pointSizeFromFontSizeEnum( FontSize fontSize );
|
||||
static FontSize fontSizeEnumFromPointSize( int pointSize );
|
||||
|
||||
static void clear();
|
||||
|
||||
private:
|
||||
static std::map<FontSize, cvf::ref<caf::FixedAtlasFont>> ms_fonts;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user