summaryrefslogtreecommitdiff
path: root/opengl/tests/gl_basic/gl_basic.cpp
diff options
context:
space:
mode:
authorDan Stoza <stoza@google.com>2018-02-27 15:42:25 -0800
committerDan Stoza <stoza@google.com>2018-02-28 18:46:11 +0000
commit101d8dc00001bd282f09a25f10058c77f982c11c (patch)
treee9b6b7a5e391f3c93e9f8e5b53962e23305f93e5 /opengl/tests/gl_basic/gl_basic.cpp
parent08300cf571a45404d712cb366b88f75b8841fff0 (diff)
SF: Fix mGraphicBufferProducerList
This change is primarily to fix a memory leak discovered while investigating bug 73792507. It turned out that while we were adding every new IGBP to SF's list (which it uses for authentication), we were never removing anything from that list, causing us to leak wp<> items. The root cause was some subtlety around MonitoredProducer, which wraps a generic IGBP in order to allow SF to perform some work when one is destroyed. When we were adding elements to mGBPL, we were adding the address of the MonitoredProducer, but upon destruction, the MonitoredProducer was trying to remove the address of its wrapped IGBP, which, naturally, wasn't present in the list. In order to address this, the key functional change here is to pass the IBinder address of the MonitoredProducer from its destructor rather than that of the wrapped IGBP. On top of the bug fix, however, this also switches from a custom MessageBase-derived class to LambdaMessage and converts mGBPL from a SortedVector to a std::set. Bug: 73792507 Test: Manual - log lines to verify mGBPL no longer increases over time Change-Id: Idabae211354561a0f13c8d9e594c7acc4822aab0
Diffstat (limited to 'opengl/tests/gl_basic/gl_basic.cpp')
0 files changed, 0 insertions, 0 deletions