purge cached bitmaps on exit
This commit is contained in:
parent
6263b0e3bb
commit
74177e5421
3 changed files with 9 additions and 1 deletions
|
@ -134,6 +134,13 @@ SkBitmap* getCachedBitmap(RenderingContext* rc, const std::string& bitmapResourc
|
|||
return iconBitmap;
|
||||
}
|
||||
|
||||
void purgeCachedBitmaps() {
|
||||
HMAP::hash_map<std::string, SkBitmap*>::iterator it = cachedBitmaps.begin();
|
||||
for (; it != cachedBitmaps.end(); it++) {
|
||||
delete it->second;
|
||||
}
|
||||
}
|
||||
|
||||
std::string RenderingContext::getTranslatedString(const std::string& src) {
|
||||
return src;
|
||||
}
|
||||
|
|
|
@ -295,7 +295,7 @@ public:
|
|||
};
|
||||
|
||||
SkBitmap* getCachedBitmap(RenderingContext* rc, const std::string& bitmapResource);
|
||||
|
||||
void purgeCachedBitmaps();
|
||||
|
||||
int get31TileNumberX(double longitude);
|
||||
int get31TileNumberY( double latitude);
|
||||
|
|
|
@ -328,4 +328,5 @@ int main(int argc, char **argv) {
|
|||
}
|
||||
|
||||
SkGraphics::PurgeFontCache();
|
||||
purgeCachedBitmaps();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue