I wrote down a plugin to create a LUA custom function. This function tried to acces vision sensor data using simGetVisionSensorDepthBuffer() and simGetVisionSensorImage(). As I run my plugin in simulation, my memory consumption continuously increased and reached maximum. I did some checking through all line in my code and found out that the leak sources are those two functions. The part of my code is shown below.
Code: Select all
float *depth_image, *color_image; depth_image = simGetVisionSensorDepthBuffer(vision_handler); color_image = simGetVisionSensorImage(vision_handler);
Is it related with the C-return value explanation in API section of simGetVisionSensorImage() --> "The user is in charge of releasing the returned buffer with simReleaseBuffer"?