-
Notifications
You must be signed in to change notification settings - Fork 212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lifetime of Data for for TYPE_32FC1, TYPE_16UC1, TYPE_16S1, and TYPE_MONO #706
Comments
Actually, it is much worse than a memory leak. For instance, looking at this code: rviz/rviz_default_plugins/src/rviz_default_plugins/displays/image/ros_image_texture.cpp Lines 277 to 288 in 94f6dd6
We enter the scope, do a stack allocation of a |
Improve lifetime of data_ptr in Rviz through the use of shared pointers.
The formats TYPE_32FC1, TYPE_16UC1, TYPE_16S1, and TYPE_MONO create a vector buffer inside the
setFormatAndNormalizeDataIfNecessary
function. This could cause memory leaks if they are not properly deallocated.A change made using shared pointers for YUV422 and YUV422_YUY2 format images inside ros_image_texture.cpp could be a solution to this problem.
As seen in pull request #701
The text was updated successfully, but these errors were encountered: