So we have something like:
//...
for(i=0;i<out->size;i++)
{
CvPoint pt1 = { out->values[ i * out->dim + 0 ], out->values[ i * out->dim + 1]};
CvPoint pt2 = { out->values[ i * out->dim + 2 ], out->values[ i * out->dim + 3 ] };
cvLine(destination, pt1, pt2, CV_RGB(240, 255, 255), 1, CV_AA,0);
}
//...
performed 24 times per second for something like 200 lines. Do we need to delete CvPoint’s and how to do it?
You do not need to delete them, the compiler deletes the CvPoint instances automatically for you as they are stored on the stack.