This is embarrassing - but I am rusty! The memory leak comes from this line of code:

Code:
char *chpts = new char[sPoints.GetLength() + 1];
How can I delete it? A simple delete chpts causes things to blow up. Methinks I need to traverse through each element and delete it? Or what?