Help for this page

Select Code to Download


  1. or download this
    SV *tmp = newSVsv(foo);
    do_something(tmp);
    SvREFCNT_dec(tmp);
    
  2. or download this
    SV *tmp = sv_2mortal(newSVsv(foo));
    do_something(tmp);
    /* no clean up code required here */
    
  3. or download this
    SV *tmp = sv_2mortal(newSVsv(foo));
    if (av_store(av, ix, tmp)) SvREFCNT_inc(tmp);