summaryrefslogtreecommitdiffstats
path: root/libs/hwui/FontRenderer.cpp
diff options
context:
space:
mode:
authorRomain Guy <romainguy@google.com>2012-03-21 11:52:52 -0700
committerRomain Guy <romainguy@google.com>2012-03-21 11:52:52 -0700
commitb0317984d34da99b614597ad0a8b39268eacb783 (patch)
tree0f3fceea85382bd70af903866f8e2750ac168f31 /libs/hwui/FontRenderer.cpp
parente72cf7341a608402309ce894fc12d050cc7c0e14 (diff)
downloadframeworks_base-b0317984d34da99b614597ad0a8b39268eacb783.zip
frameworks_base-b0317984d34da99b614597ad0a8b39268eacb783.tar.gz
frameworks_base-b0317984d34da99b614597ad0a8b39268eacb783.tar.bz2
Plug memory leak.
Bug #6196903 Whenever a memory flush happens, the GL renderer discards some or all of its font caches. Each font cache holds an array of vertex indices that was initially designed to have the same life cycle as the process. This changed when memory flushes were introduced but this array was never taken care of in the destructor. Change-Id: Ief124f609ea55b671c0a9b43637d9e013629ebaa
Diffstat (limited to 'libs/hwui/FontRenderer.cpp')
-rw-r--r--libs/hwui/FontRenderer.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/libs/hwui/FontRenderer.cpp b/libs/hwui/FontRenderer.cpp
index 92a7573..d7937c7 100644
--- a/libs/hwui/FontRenderer.cpp
+++ b/libs/hwui/FontRenderer.cpp
@@ -518,6 +518,8 @@ FontRenderer::~FontRenderer() {
mCacheLines.clear();
if (mInitialized) {
+ glDeleteBuffers(1, &mIndexBufferID);
+
delete[] mTextMeshPtr;
delete mCacheTextureSmall;
delete mCacheTexture128;