I have a class that I want to contain multiple objects of something I created. Right now the code that works is:

**process.h:**

```
private:
  myObj *data;

```

**process.cc:**

```
data = new myObj[10];

```

I would like to pass a value to the constructor however, so I tried to convert it to a std::vector (after modifying constructor to take a value).

**process.h:**

```
private:
  std::vector<myObj> data;

```

**process.cc:**

```
for (int m=0; m<10; m++) data.push_back( myObj(1.2) );

```

When I try that it crashes upon execution with

```
*** glibc detected *** ... corrupted double-linked list: ... ***

```

And the backtrace in gdb shows an error in the destructor when I tried to free some memory for other arrays I allocated. A search didn't show up anything that was obvious. I am using a few static member variables in `myObj`, could that be an issue?