Tricky weak_ptr and shared_ptr interaction:<img alt="" data-cke-saved-src="https://2.bp.blogspot.com/-2XIQxeCUBFc/Wi2JGz_EcXI/AAAAAAAADNU/vEkN6ZtXR-Yon5YuZWBxk-6kjmHD1011ACLcBGAs/s1600/control_block.png" src="https://2.bp.blogspot.com/-2XIQxeCUBFc/Wi2JGz_EcXI/AAAAAAAADNU/vEkN6ZtXR-Yon5YuZWBxk-6kjmHD1011ACLcBGAs/s1600/control_block.png" right;"="" style="float: right; width: 230px; height: 199px;">
How a weak_ptr might prevent full memory cleanup of managed object
by Bartlomiej Filipek
From the article:
It appears that in some cases memory allocated for the object controlled by smart_ptr might not be released until all weak pointers are also ‘dead’.
Add a Comment
Comments are closed.