[debug notes] pointer error when STD:: vector is used in VTK “access conflict when reading location XXX”

1. Build a vector tempActor;
2. Create Actor with VTKSmartPointer
3. Put the actor into tempActor using push_back;
4. Returns tempActor, as shown below.

std::vector<vtkActor*> tempActor;
vtkSmartPointer<vtkActor> actor = vtkSmartPointer<vtkActor>::New();
tempActor.push_back(actor);
return tempActor;

After the compilation was successful, the execution error occurred, and an access conflict occurred when reading location XXX. The reason should be a pointer problem.
Solution: Instead of using vtksmartPointer, replace it with

vtkActor* actor = vtkActor::New();

Read More: