Skip to content

Commit

Permalink
memory leak during evs app run
Browse files Browse the repository at this point in the history
native buffer handle not getting released after frame render

need to release the native buffer handle on done with frames

Tests: tested the evs app running and checked memory usage for 1hr

Tracked-On: OAM-123574
Signed-off-by: shivasku82 <[email protected]>
  • Loading branch information
shivasku82 committed Aug 30, 2024
1 parent 1410d95 commit 5161b99
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion evs/apps/default/src/VideoTex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ bool VideoTex::refresh() {
}

// If we already have an image backing us, then it's time to return it
if (getNativeHandle(mImageBuffer) != nullptr) {
auto h = getNativeHandle(mImageBuffer);
if(h != nullptr) {
// Drop our device texture image
if (mKHRimage != EGL_NO_IMAGE_KHR) {
eglDestroyImageKHR(mDisplay, mKHRimage);
Expand All @@ -84,6 +85,7 @@ bool VideoTex::refresh() {

// Return it since we're done with it
mStreamHandler->doneWithFrame(mImageBuffer);
free(h);
}

// Get the new image we want to use as our contents
Expand Down

0 comments on commit 5161b99

Please sign in to comment.