newoperator is considered harmful.
If an application is to be portable, it needs to encapsulate platform dependecies.
These "platforms" might include: windowing system, operating system, database, etc.
Too often, this encapsulation is not engineered in advance, and lots of
case statements with options for all currently supported platforms begin to
procreate like rabbits throughout the code.
The purpose of the Abstract Factory is to provide an interface for creating families of related objects, without specifying concrete classes. This pattern is found in the sheet metal stamping equipment used in the manufacture of Japanese automobiles. The stamping equipment is an Abstract Factory which creates auto body parts. The same machinery is used to stamp right hand doors, left hand doors, right front fenders, left front fenders, hoods, etc. for different models of cars. Through the use of rollers to change the stamping dies, the concrete classes produced by the machinery can be changed within three minutes.