Very very well explained! Explained clearly and at an ideal speed of speech. It is very pleasant to listen to and you can directly comprehend the content conveyed. Thanks for the great video!
I have checked out a lot of sources and channels but none of them explained as good as this one. can you by any chance make a data structures series in c++? it would be bomb!
hey Kevin. at 4:49, variable singleton1 is also a reference to a Singleton object. But get instance also returns a reference, so you returining a double reference at the end? Im getting kinda confused
The get_instance() function returns an instance, and singleton1 is an instance, so the types make sense. We're not returning a 'double reference' or anything like that.... get_instance() just returns a reference to that static instance variable and singleton1 will then become a reference (i.e. synonym) to that same variable. Reference variables definitely aren't straightforward, maybe this video will b useful: th-cam.com/video/e3DN1RaYVYQ/w-d-xo.html.
I would love to cover all the classic design patterns in C++ and Python. Exactly when I'll get to doing more, I'm not sure. :-) This video has started to get some great feedback and viewership over the last while though, which is really encouraging to make more design pattern videos.
I have a doubt acc to definition n code; the second creation of object singleton2 should not be correct or possible. What is the reason we don’t get any such error?
Making the copy constructor a deleted function is what prevents the Singleton from being copied by using an assignment operator like this :Singleton singletonN = singleton1;. If the copy constructor is not a deleted function, then the assignment statement will be OK, and we will get a copy of the singleton using the default copy constructor.
Why make the constructor protected instead of private? I always made my singleton class constructors private and have had no issues. Maybe protected is doing something else I don't know?
Thanks for following the channel Rama. Is that a topic you think I should make a video on? Do you have a link to the article or video that you came across? :-)
Easy understand even for Juniors, thx MAN...
Very very well explained! Explained clearly and at an ideal speed of speech. It is very pleasant to listen to and you can directly comprehend the content conveyed. Thanks for the great video!
Thank you for sharing such kind positive feedback, and you're very welcome! 🙂
Great and well explained video. Thank your for your sharing. I hope you could add the rest of design patterns. It would be very helpful.
You’re welcome! :-) I do eventually want to cover more design patterns in C++.
I have checked out a lot of sources and channels but none of them explained as good as this one. can you by any chance make a data structures series in c++? it would be bomb!
I'm glad you enjoyed the video! :-) And hopefully one day I can do a data structures series in C++.
I don't know why you dropped this serial, but very looking forward to have more
Your lessons are really brilliant! Short, terse, succinct with clear examples. Are you on Patreon?
hey Kevin.
at 4:49, variable singleton1 is also a reference to a Singleton object. But get instance also returns a reference, so you returining a double reference at the end? Im getting kinda confused
The get_instance() function returns an instance, and singleton1 is an instance, so the types make sense. We're not returning a 'double reference' or anything like that.... get_instance() just returns a reference to that static instance variable and singleton1 will then become a reference (i.e. synonym) to that same variable. Reference variables definitely aren't straightforward, maybe this video will b useful: th-cam.com/video/e3DN1RaYVYQ/w-d-xo.html.
@@PortfolioCourses thanks master
Haha you’re welcome! :-)
Great video. Are there any plans to do any more design pattern videos? I would love to see more
I would love to cover all the classic design patterns in C++ and Python. Exactly when I'll get to doing more, I'm not sure. :-) This video has started to get some great feedback and viewership over the last while though, which is really encouraging to make more design pattern videos.
good stuff Kevin!
Thanks Victor! 🙂
Thanks for the video...it really helps.:)
You're welcome Rahul! :-)
I have a doubt acc to definition n code; the second creation of object singleton2 should not be correct or possible.
What is the reason we don’t get any such error?
Making the copy constructor a deleted function is what prevents the Singleton from being copied by using an assignment operator like this :Singleton singletonN = singleton1;. If the copy constructor is not a deleted function, then the assignment statement will be OK, and we will get a copy of the singleton using the default copy constructor.
Thanks ❤ keep it up & plz post other important design patterns tooo
You’re welcome! :-) What other design patterns would you like to see covered?
@@PortfolioCourses decorator, command patterns and some important design patterns.. And Thanks for the response 🙌💫
@@CSEAJMALAKRAMS Thanks for the feedback! 🙂
Why make the constructor protected instead of private? I always made my singleton class constructors private and have had no issues. Maybe protected is doing something else I don't know?
Not really sure either, constructors aren't inherited so idk.
Hi sir from week I have been following your channel
Recently I come across why globally pointers allocate space in data segment in memory map..
Thanks for following the channel Rama. Is that a topic you think I should make a video on? Do you have a link to the article or video that you came across? :-)
great job ❤
Thanks I’m glad you liked it! :-)
best, though you hasn't explained the syntax in the multiple deleted operators
In videos on more advanced topics like this I don't always explain certain things due to time constrains. :-)
Hello, this is nice example, could you make one video? " Multiton pattern on C++"
That is a great idea for a video, I have added to my list of ideas. :-)
@@PortfolioCourses Ohhhh, thank you very much
@@osnovan7169 You're welcome! 🙂
Thank you 😊
You're welcome Manohar! 🙂
Thanks bro