Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^3: DESTROY Function call

by Corion (Patriarch)
on Jul 17, 2018 at 20:10 UTC ( [id://1218693]=note: print w/replies, xml ) Need Help??


in reply to Re^2: DESTROY Function call
in thread DESTROY Function call

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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1218693]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2024-04-23 06:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found