summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Romain Guy <romainguy@google.com> 2012-03-21 11:52:52 -0700
committer Romain Guy <romainguy@google.com> 2012-03-21 11:52:52 -0700
commitb0317984d34da99b614597ad0a8b39268eacb783 (patch)
tree0f3fceea85382bd70af903866f8e2750ac168f31
parente72cf7341a608402309ce894fc12d050cc7c0e14 (diff)
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
-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 92a7573dde54..d7937c74f25e 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;