Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Re^9: perlembed: mortalize an AV or not (misc)

by demerphq (Chancellor)
on Jul 11, 2006 at 09:29 UTC ( #560370=note: print w/replies, xml ) Need Help??

in reply to Re^8: perlembed: mortalize an AV or not (misc)
in thread perlembed: mortalize an AV, get "Attempt to free unreferenced scalar" - don't mortalize, leaks memory

No it really doesnt look right to me. Have a look through the sources for similar code. I dont think youll see so many calls to sv_2mortal. I suggest using something like the XS that comes with DBI, or the XS that comes with List::Util for examples.

I realize that given my earlier mistaken reply you probably arent inclined to rate my opinion highly, but I strongly encourage you to look into this further. Its sufficiently different looking from XS and core code ive seen before that it rings alarm bells in my head. Especially given that you arent using newRV_noinc() anywhere, despite perlguts specifically saying you should be.


  • Comment on Re^9: perlembed: mortalize an AV or not (misc)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://560370]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (7)
As of 2017-11-23 17:20 GMT
Find Nodes?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:

    Results (336 votes). Check out past polls.