Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^3: XS: how to destroy HV* that was used internally?

by ikegami (Patriarch)
on Sep 18, 2014 at 14:07 UTC ( [id://1101056]=note: print w/replies, xml ) Need Help??


in reply to Re^2: XS: how to destroy HV* that was used internally?
in thread XS: how to destroy HV* that was used internally?

That's because SvREFCNT_dec already casts for you. In fact, it casts in a way that will detect if the input was const, so doing SvREFCNT_dec((SV*)hv) instead of SvREFCNT_dec(hv) is actually harmful.

If you ever use (SV*)x, consider using MUTABLE_SV(x) instead.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2024-04-19 15:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found