I'm trying to build simple painter (i.e. points, lines, circles ...etc) in glut. Each line must have two points of `Point` type, so every time the user enter the left button of the mouse, the chosen command is executed. For drawing a line, I need to track how many times the user click the mouse, so this is what I'v done

```
        if ( command == 1 ){ // drawing a line
            static int count(0); // track click no. 
            static std::vector<Point> p;
            //static Point startPoint(mouseX, mouseY);
            p.push_back(Point(mouseX, mouseY));

            if ( count == 1 ){
                Point endPoint(mouseX, mouseY);
                Point startPoint = p[0];
                shapes->addLine(Line(startPoint, endPoint));
                count = 0;
                p.clear();
            }else{
                count++;
            }

```

I'm using `std::vector` only to use `clear()` so that I can delete `startPoint` which I need it to be static. My question is is there a way to destroy an object without making more lines by using `vector`? I've tried to call the destructor but it didn't help.