No video

The Factory Method - Programming Design Patterns - Ep 1 - C++ Coding

  Рет қаралды 6,823

Code, Tech, and Tutorials

Code, Tech, and Tutorials

Күн бұрын

Пікірлер: 12
@dpatar91
@dpatar91 2 жыл бұрын
I learned a lot from your cmake series. I believe this will be also great.
@CodeTechandTutorials
@CodeTechandTutorials 2 жыл бұрын
I hope so too!
@IsaacCode95
@IsaacCode95 Жыл бұрын
great video !, loved the explanations, 14:45 Catdawg!
@reverse_shell
@reverse_shell 2 жыл бұрын
Glad I paid attention to your pointer lesson... this needs some cleanup. :D Factory Pattern is pretty cool! The Clone() method was pretty dope.
@CodeTechandTutorials
@CodeTechandTutorials 2 жыл бұрын
Glad you liked it!
@cesarb.yamasato1266
@cesarb.yamasato1266 Жыл бұрын
Isn't it possible to make a spawner interface with a spawn() method and then the spawn classes define it (like dogSpawner and catSpawner) so you can have just a specific creature spawner be used as a generic creature spawner?
@muonline2067
@muonline2067 2 жыл бұрын
maybe my question is very noob, but I saw in the github, the author uses many times new operator, but he never uses delete them or it? So why? Because normally when I read the book they always say that we have to delete the raw pointers to avoid memory leak, but it seems that this problem is not big, because I see that many tutorials, they never care about it.
@michaellundgren6949
@michaellundgren6949 Жыл бұрын
The operating system clean up when the program returns and exits. Its not a big deal for these example programs that don't even have many memory allocations anyway. But In a game, you will likely be calling these functions repeatedly in a main game loop and your memory usage will grow out of control if you only allocate and never delete. That is a memory leak.
@abigbagofchips
@abigbagofchips 4 ай бұрын
computers now and days the OS can handle it and for small programs it really doesn't matter. It always a great practice to do so, because as your program gets larger the more resources it will consume on the PC. If you never delete anything that is not used, your program will run out of memory that is allocated to it. PCs today, probably would just crash your program, but back in the 1900s it would crash the whole computer or worse write to protected memory that shouldn't be touch (Really rare I only heard stories). You should always call delete if you use new, or use smart pointers.
@sam-pd7su
@sam-pd7su 2 жыл бұрын
Is not against oop principles doings cast?
@prezadent1
@prezadent1 2 жыл бұрын
This is a simple factory / factory object example. It's not a pattern. Congrats on not calling it the factory method pattern or the abstract factory pattern but since this is the first video in a design patterns series, you really need to get this right. And at least 2/3 of the videos on youtube are wrong about factories and factory patterns. Stick to the GoF book.
@CodeTechandTutorials
@CodeTechandTutorials 2 жыл бұрын
Ok, thanks
The Singleton Pattern - Programming Design Patterns - Ep 2 - C++ Coding
29:07
Code, Tech, and Tutorials
Рет қаралды 1,7 М.
Design Patterns Master Class | All Design Patterns Covered
3:46:08
Daily Code Buffer
Рет қаралды 58 М.
The Giant sleep in the town 👹🛏️🏡
00:24
Construction Site
Рет қаралды 19 МЛН
黑天使遇到什么了?#short #angel #clown
00:34
Super Beauty team
Рет қаралды 43 МЛН
Чёрная ДЫРА 🕳️ | WICSUR #shorts
00:49
Бискас
Рет қаралды 4,7 МЛН
The Bridge Design Pattern (as RPG Player Character) - Ep 23 - C++ Coding
32:35
Code, Tech, and Tutorials
Рет қаралды 2 М.
CMake Tutorial EP 2 | Libraries | Installing | Pairing with Executables | RE-DONE!
36:48
The Observer Design Pattern in Cpp - Mike Shah - CppCon 2022
1:02:17
State Design - Programming Design Patterns - Ep 16 - C++ Coding
14:44
Code, Tech, and Tutorials
Рет қаралды 9 М.
C++ Code-along Ep 1: Demo RPG Game | Motivation, Learn, Practice
38:00
Code, Tech, and Tutorials
Рет қаралды 36 М.
Delivering Safe C++ - Bjarne Stroustrup - CppCon 2023
1:29:16
Colour Picker (Part 18): Embedding the Font/Shader!
1:57:29
C++ Tutorial: the factory design pattern
14:21
Professor Hank Stalica
Рет қаралды 10 М.
The Giant sleep in the town 👹🛏️🏡
00:24
Construction Site
Рет қаралды 19 МЛН