diff options
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 |
commit | b0317984d34da99b614597ad0a8b39268eacb783 (patch) | |
tree | 0f3fceea85382bd70af903866f8e2750ac168f31 /libs/hwui/FontRenderer.cpp | |
parent | e72cf7341a608402309ce894fc12d050cc7c0e14 (diff) | |
download | frameworks_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.cpp | 2 |
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; |