Skip to content

Commit b031798

Browse files
author
Romain Guy
committed
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
1 parent e72cf73 commit b031798

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

libs/hwui/FontRenderer.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -518,6 +518,8 @@ FontRenderer::~FontRenderer() {
518518
mCacheLines.clear();
519519

520520
if (mInitialized) {
521+
glDeleteBuffers(1, &mIndexBufferID);
522+
521523
delete[] mTextMeshPtr;
522524
delete mCacheTextureSmall;
523525
delete mCacheTexture128;

0 commit comments

Comments
 (0)