Why are you using raw pointers and raw dynamic arrays in the first place?
The C++ way to create the dynamic array in your first line would be the following:
std::vector<ClassA*> object1(10);
This creates a vector with 10 null pointers in it.
The next two lines could be the same, but you'd still have the issue of manually managing the object lifetimes and memory of the ClassA objects. Let's fix that by using smart pointers:
std::vector<std::unique_ptr<ClassA>> object1(10);
object1[0] = std::make_unique<ClassA>();
object1[1] = std::make_unique<ClassA>();
Depending on the circumstances you probably won't need a vector with exactly 10 elements and the last 8 being null pointers. If you want the vector to contain only the elements that are actually set, then do not assign an initial size to the vector and just push in the objects you acutally have:
std::vector<std::unique_ptr<ClassA>> object1; //empty vector
object1.push_back(std::make_unique<ClassA>()); //now has 1 element
object1.push_back(std::make_unique<ClassA>()); //now has 2 elements
And as a last improvement, unless you really need there to be pointers in the vector (e.g. because you have polymorphic elements), just use a vector of objects, not of pointers:
std::vector<ClassA> object1; //empty vector
object1.push_back(ClassA{}); //now has 1 element
object1.push_back(ClassA{}); //now has 2 elements
new []in example 1?