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

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

// If we already have an image backing us, then it's time to return it
if (getNativeHandle(mImageBuffer) != nullptr) {
if (auto h = getNativeHandle(mImageBuffer); h != nullptr) {
// Drop our device texture image
if (mKHRimage != EGL_NO_IMAGE_KHR) {
eglDestroyImageKHR(mDisplay, mKHRimage);
Expand All @@ -84,6 +84,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 f89050f

Please sign in to comment.