Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Creational pattern
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Examples== Some examples of creational design patterns include: * [[Abstract factory pattern|Abstract Factory pattern]]: a class requests the objects it requires from a factory object instead of creating the objects directly * [[Factory method pattern]]: centralize creation of an object of a specific type choosing one of several implementations * [[Builder pattern]]: separate the construction of a complex object from its representation so that the same construction process can create different representations * [[Dependency injection|Dependency Injection pattern]]: a class accepts the objects it requires from an injector instead of creating the objects directly * [[Lazy initialization pattern]]: tactic of delaying the creation of an object, the calculation of a value, or some other expensive process until the first time it is needed * [[Object pool pattern]]: avoid expensive acquisition and release of resources by recycling objects that are no longer in use * [[Prototype pattern]]: used when the type of objects to create is determined by a prototypical instance, which is cloned to produce new objects * [[Singleton pattern]]: restrict instantiation of a class to one object
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)