laziness, impatience, and hubris | |
PerlMonks |
Re^3: DESTROY Function callby Corion (Patriarch) |
on Jul 17, 2018 at 20:10 UTC ( [id://1218693]=note: print w/replies, xml ) | Need Help?? |
No. Objects in C++ are not reference counted in general. The C++ FAQ on Destructors discusses many of the topics also touched upon here. Objects as a local variable will have their destructor called on the closing bracket, and there cannot be a reference to them in valid code. So reference counting makes no sense in that context. Objects created with new need to be explicitly disposed of by using delete. No reference counting is in play there either.
In Section
Seekers of Perl Wisdom
|
|