You cannot keep a pointer of a temporary object. The memory will be reused, so you have invalid memory access
std::vector<AbstractClass*> vectorClasses;
vectorClasses.push_back(&SomeClass1()); // ill formed, SomeClass1() is create on the stack and destroy after push_back call is done, referencing the pointer after that is invalid as it will not be a SomeClass1 anymore.
As you need polymorphism, you should do that instead, smart pointer must be prefered over naked pointer.
std::vector<std::unique_ptr<AbstractClass>> vectorClasses;
vectorClasses.push_back( std::make_unique<SomeClass1>() );
vectorClasses.push_back( std::make_unique<SomeClass2>() );
vectorClasses.push_back( std::unique_ptr<SomeClass3>( new SomeClass3{} ) ); // if make_unique not available