Ok, I'm pretty sure that I'll get my head bitten of for this but if you are going to, please at least point me to a webpage that explains it.
I am using Point Cloud Library to manipulate point clouds (just to give the context). From my main I call a function and withing that function I use
It is essentially a class that acts as a pointer and the constructor needs the regular class as its argument. My question is this: do I need to delete the new pcl::PointCloud<pcl::PointXYZRGB> object before I leave the function or will it delete this by itself? I can run it just fine without doing so but I'm not sure if this causes memory leaks (I've encountered a lot of articles about this on the internet)Code:pcl::PointCloud<pcl::PointXYZRGB>::Ptr cloudIn(new pcl::PointCloud<pcl::PointXYZRGB>());