NvBufSurfaceSyncForCpu memory leak

Hi, I am using gstdsexample with just an addition of imwrite in get_converted_mat() function in test5-app. There’s a memory leak in the app. I think it’s because of the NvBUfSurfaceSyncForCpu function.
This function caches the buffer for CPU access, but it apparantly doesn’t clear it.

Is this right or there can be some other reason for memory leak? If it’s because of NvBufSurfaceSyncForCpu, how can I resolve it?

• Hardware Platform : Jetson
• DeepStream Version: 4.0.1
• JetPack Version: 4.2.3

Hi saurabh,

We have some fixes at newly release DeepStream 5.0 DP version, please migrate your Jetson to JetPack 4.4 DP + DeepStream 5.0 DP version to run the test again.