Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: XS DESTROY not invoked

by CarlosV (Novice)
on Sep 24, 2012 at 09:32 UTC ( #995329=note: print w/replies, xml ) Need Help??


in reply to XS DESTROY not invoked

Wow, replying to myself. After reading a doc called "XS Mechanics" I did a last try, and this worked:

###################################################################### +### MODULE = OpenCA::OpenSSL PACKAGE = OpenCA::OpenSSL::CRL void DESTROY(crl) OpenCA_OpenSSL_CRL crl CODE: fprintf(stderr, "DESTROY\n"); X509_CRL_free(crl);

I am not 100% sure why this works, but as I read in the XS Mechanics, it seems that Ptr is only used/converted when a * is in the object, and as this is not the case, we don't need the Ptr at all, so the DESTROY can be in the OpenCA::OpenSSL::CRL package directly

Sigh... I have been all weekend fighting with this, and never tried this :(

Replies are listed 'Best First'.
Re^2: XS DESTROY not invoked
by Anonymous Monk on Sep 25, 2012 at 00:45 UTC

    I am not 100% sure why this work

    Neither are we , because we couldn't try this code :)

    Looks like all you did was remove prefix , and use a different package -- that could explain it (being in the wrong package)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://995329]
help
Chatterbox?
[choroba]: It has the widest rear seats space available in the same price category - needed for the 3 kids.
Discipulus families growth is related to price of cars nowadays..
[choroba]: price of anything, unfortunately
[Discipulus]: yes, unfortunately.
[Corion]: Discipulus: you can "easily" trap shutdown/logoff in a Win32::GUI application by capturing and responding to the appropriate message
[LanX]: choroba wants to scale further? :)
[Discipulus]: I read an article about how much the female condition has got worst in the eastern europe after the fall of social policies

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (10)
As of 2017-01-17 09:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (154 votes). Check out past polls.