Quantcast
Channel: User Peter - Reinstate Monica - Stack Overflow
Viewing all articles
Browse latest Browse all 223

Comment by Peter - Reinstate Monica on Is it safe to use a current object within the storage of a destroyed object?

$
0
0
@GarrGodfrey Why would the union change its contents if the containing object's destructor is executed? As pointed out here, the union's destructor is actually deleted, so it is not called. Of course, ~Object1() can overwrite any member's memory (and more) but so can any other (member or not) function, so that is not really relevant to the discussion.

Viewing all articles
Browse latest Browse all 223

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>