Bifalgorithm post
So today I'll show you a live example how shared pointer will not work and that would be in one minute. So if you see here, let's suppose you have a relationship of mother, son and daughter. So daughter has a mother and mother has a daughter. Son has a mother and mother has a son. So if this is the condition and this is how your code is looking like, you can pause this video and just try to understand this. like what is written here. I will scroll this a little bit horizontally also so that you can see this part. So if this is the case, then if I compile, none of these objects will get disrupted. I'll quickly show you that. If I run this, nothing is there. See, this output is actually empty here. The moment I'll make this shadepointer as weak pointer and now if I'll compile and execute, see daughter gone, son gone and mother gone. So everything is working fine. If you want to watch a full video just check the description you will get the link. Thanks for watching guys. Bye bye take care.
So today I'll show you a live example how shared pointer will not work and that would be in one minute. So if you see here, let's suppose you have a relationsh…
Ideas in this flowchart
- Shared Pointer Example
- Initial Setup
- Mother-Son-Daughter Relationship
- Shared Pointer Issue
- Objects Not Disrupted
- Weak Pointer Solution
- Objects Released
- Video Link in Description