qaz@lemmy.world to Programmer Humor@programming.devEnglish · 5 hours agoThe C++ experiencelemmy.worldimagemessage-square5fedilinkarrow-up155
arrow-up155imageThe C++ experiencelemmy.worldqaz@lemmy.world to Programmer Humor@programming.devEnglish · 5 hours agomessage-square5fedilink
minus-squareMyNameIsRichard@lemmy.mllinkfedilinkarrow-up5·5 hours agoThere’s always a destructor though. It may do nothing but it’s there.
minus-squareValmond@lemmy.worldlinkfedilinkarrow-up6·5 hours agoNo need to declare it though ofc. Rule of 0/3/5
minus-squareMyNameIsRichard@lemmy.mllinkfedilinkarrow-up1·3 hours agoYeah the compiler generates it so it’s always there
minus-squareValmond@lemmy.worldlinkfedilinkarrow-up2·2 hours agoWell yes, except when you allocate stuff in the constructor.
There’s always a destructor though. It may do nothing but it’s there.
No need to declare it though ofc.
Rule of 0/3/5
Yeah the compiler generates it so it’s always there
Well yes, except when you allocate stuff in the constructor.