Shared Pointer In C++

Поделиться
HTML-код
  • Опубликовано: 24 ноя 2024

Комментарии • 50

  • @karthickraj6580
    @karthickraj6580 4 года назад +7

    Exact explanation, thank you so much for your effort, like the term manageable object.

    • @CppNuts
      @CppNuts  4 года назад

      Thanks dude..

  • @ishant162
    @ishant162 2 года назад

    Next level explaination bro🔥🔥🔥 and next level accent as well😂

    • @CppNuts
      @CppNuts  2 года назад +2

      Theenkksss

  • @Astfresser
    @Astfresser 2 года назад

    I think writing a global smart pointer std::shared_ptr sp1 = sp would also not be atomic in case the write takes place from multiple threads. The smart pointer class object is subject to tearing. So you need to use atomic_load() (C++11) or atomic shared pointers (C++20).

  • @mentalthink1
    @mentalthink1 4 года назад +2

    Thanks a lot, I¡m doing a course form Udemy and here is more clear, thanks a lot. I see the videos have now a lot more of quality... Thanks for your work is really helpfull.

    • @CppNuts
      @CppNuts  4 года назад

      Great to hear!

  • @mdshamshalam8925
    @mdshamshalam8925 4 года назад

    cleared all concepts. Thanks a lot. please one video on "Lamba expression in details which is introduced in C++ 11"

    • @CppNuts
      @CppNuts  4 года назад

      Will upload soon!! Actually i thought i have already given this video, thanks dude.

  • @АндрейШумилов-с8щ
    @АндрейШумилов-с8щ 4 года назад +1

    Hello. You forgot to mention about that you can use a deleter function then you create a share pointers, and the profit of using a make_shared function.

  • @mehdimemar
    @mehdimemar 4 года назад +2

    Well explained, thank you.

    • @CppNuts
      @CppNuts  4 года назад

      Thanks man!!

  • @amithtripst9851
    @amithtripst9851 7 месяцев назад

    Can you please tell, What is the IDE you use for compilation?

  • @ashotminasyan8657
    @ashotminasyan8657 2 года назад

    Question about 4.b point
    why it should detroy managed object if initialzed with some other shared_ptr?

  • @possumcode
    @possumcode 2 года назад

    great video. thank you!

  • @J7777788888
    @J7777788888 4 года назад

    Thanks sir ~Well explained.

    • @CppNuts
      @CppNuts  4 года назад

      Glad it was helpful!

  • @rahulr9301
    @rahulr9301 2 года назад

    bro @CppNuts how you told -> is overloaded??. Just Curious:)

  • @ohmnamo7056
    @ohmnamo7056 4 года назад +1

    hy bro excellant explanation....please clear my doubt bro ...
    why you are using dot operator for use_count instead of arrow operator because my understanding is sp is a pointer so we must use arrow operator to deference anything . thanks cppnuts

    • @CppNuts
      @CppNuts  4 года назад +2

      Arrow operator is for managed object, and dot operator is for SP class it self. Because we have object of SP so we can use dot operator to access member functions of SP class.

    • @ohmnamo7056
      @ohmnamo7056 4 года назад +1

      @@CppNuts thanks a lot brother got it .....

  • @Srikanthpalvai
    @Srikanthpalvai 4 года назад +1

    Hi Rupesh,
    Interviewer Asked me a question What is the actual use of reference count when it will be useful
    what you will do by knowing the count. where you will use?

    • @CppNuts
      @CppNuts  4 года назад +1

      Reference count is used to protect your variable from deleting. Meaning if your variable is being referenced somewhere then it should not be deleted so we keep the reference count to find if some where this variable is being used.

  • @tails_the_god
    @tails_the_god 3 года назад

    Yes very well explained cleared up some confusion thank you! : D

    • @CppNuts
      @CppNuts  3 года назад +1

      Glad it was helpful!

  • @sai6948
    @sai6948 4 года назад +2

    Can you make a video on "
    " vs endl?

  • @anithashetty7055
    @anithashetty7055 4 года назад

    In Foo destructor pointer deletion s required r is it taken care by smart pointers,
    If so y destructor is called.
    Thank u

  • @deepsohal3766
    @deepsohal3766 3 года назад

    could you please give me a hint on line 25 constructor. i am new to this

  • @surya1harsha
    @surya1harsha 4 года назад

    at the end of the video u have added lock guard to the thread function but did not explain, i think its to make the managed object as thread safe? correct me if i am wrong

  • @mehdimemar
    @mehdimemar 4 года назад +1

    I checked with cplusplus, I think the syntax shown in thumbnail of the video is not correct.

    • @CppNuts
      @CppNuts  4 года назад

      Correct..
      I will change it thanks man..
      In hurry it happens.. 😁

  • @nilofarchanda5698
    @nilofarchanda5698 3 года назад

    Is it possible to copy vector data... So that we can pass shared in function
    Std::make_shared

  • @vinayrag923
    @vinayrag923 3 года назад

    Bro please tell where you studied , this much detailed, i want to read..

    • @CppNuts
      @CppNuts  3 года назад +2

      Stackoverflow 😂

  • @Agent_Ax
    @Agent_Ax 3 года назад

    I'll have to go 20 seconds back because i was reading comment instead of watching the video 😂

  • @intiyazahmed5775
    @intiyazahmed5775 2 года назад

    Nice explanation, Is there any way to get the program source file ?

    • @CppNuts
      @CppNuts  2 года назад

      Yes please check channel about page.

  • @vvpChannel3112
    @vvpChannel3112 4 года назад

    when are you making videos on deleter / custom deleters ?

    • @CppNuts
      @CppNuts  4 года назад

      It will take time, now i am working on DS.

  • @pk471
    @pk471 3 года назад

    sir we conduct the online classes? give me the replay plz

  • @rahulsholapurkar741
    @rahulsholapurkar741 4 года назад

    Objaaaact!!!!

  • @MeraKEI
    @MeraKEI 2 года назад

    Please do not use foo bar func as names. This is the reason most people don’t understand the real world usage.

  • @sakthilingesh2853
    @sakthilingesh2853 4 года назад

    two much ads bro

    • @CppNuts
      @CppNuts  4 года назад

      Sorry dude!!

  • @sushreedash4262
    @sushreedash4262 3 года назад

    Good explanation. But dont have this fake accent while you are presenting something

    • @CppNuts
      @CppNuts  3 года назад +1

      Kuch cheeze nahi badal sakta hu.. :P