You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-2Lines changed: 4 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -529,7 +529,7 @@ You have a class and now you create several "decorator" classes that modifies so
529
529
530
530
## 21. Factory
531
531
532
-
Collect all methods on how to create new objects in their own class. For each object you make you have to allocate some memory, and by creating all objects in a central area it makes it easier to monitor these allocations. The factory can also be responsible for the destruction of objects.
532
+
Collect all methods on how to create new objects in their own class. The factory can also be responsible for the destruction of objects.
533
533
534
534
**How to implement?**
535
535
@@ -539,7 +539,9 @@ If you are creating several different factories, then they should inherit from s
539
539
540
540
- If you've implemented the [Decorator](#20-decorator) then you can decorate the objects in a procedural way by using the Factory pattern. An example of this is in the code where you manufacture the Tesla cars you ordered in the Decorator pattern example.
541
541
542
-
- To play sounds on different devices. An example of this can be found in the code section.
542
+
- To play sounds on different devices. An example of this can be found in the code section.
543
+
544
+
- For each object you make you have to allocate some memory. By creating all objects in a central area it makes it easier to monitor these allocations.
0 commit comments