Skip to content

Commit 9e3879b

Browse files
committed
Updated readme
1 parent 9a95ce1 commit 9e3879b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ You have a class and now you create several "decorator" classes that modifies so
529529

530530
## 21. Factory
531531

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.
533533

534534
**How to implement?**
535535

@@ -539,7 +539,9 @@ If you are creating several different factories, then they should inherit from s
539539

540540
- 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.
541541

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.
543545

544546
**Related patterns**
545547

0 commit comments

Comments
 (0)