I need to declare and initialize a vector as a field of a class named PixelOperator. There are 2 ways to declare it:
1. vector<int>* field = new vector<int>(); //on the heap
2. vector<int> field = vector<int>(); //on the stack
If I choose to declare in style number 1, I need to call delete in the destructor of the class.
If the class is initialized on the heap (ie. PixelOperator* op = new PixelOperator();), are fields initialized on the stack initialized on the heap?