-----BEGIN PGP SIGNED MESSAGE----- Moin,
On Sunday 15 August 2004 22:33, muppet wrote: > On Aug 15, 2004, at 4:14 PM, Tels wrote: > > First, thank you all for your time and tricks and tipps. > > no problem. > > > See the sv2mortal(ST(0)); there? :) I think it doesn't hurt, but it > > certainly is not neccessary, since everything works fine without it. > > the point of the sv_2mortal() is leak prevention. what if calling code > doesn't take a reference on the values from the stack? they should go > away. without the stuff on the stack being mortal, they might not ever > get unref'ed. > > of course, this is subject to subtleties like scratchpads and different > treatment of simple values and such, so i won't dare to say your code > is leaking, but in my own experience, i needed the sv_2mortal() to > avoid leaking scalars, especially references. perhaps nick could say > definitively. > > /me looks expectantly at nick my point was that mortalizing the special things SV_no and SV_yes is pointless (it might be harmless as Tassilo points out, but I cannot say that it will not really have a negative effect). In addition, I think my FastCalc code now has some leaks where I forgot the mortalization. I have to test it with Devel::Leak again... Damn, in the past two years I forgot nearly everything about XS :/ Best wishes, Tels - -- Signed on Sun Aug 15 22:38:54 2004 with key 0x93B84C15. Visit my photo gallery at http://bloodgate.com/photos/ PGP key on http://bloodgate.com/tels.asc or per email. This email violates U.S. patent #4,197,590: for (x = 0; x < widht; x++) { for (y = 0; y < height; y++) { setPixel (x+xm, y+ym, getPixel(x+xm,y+ym) ^ getCursorPixel(x,y); } } -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) Comment: When cryptography is outlawed, bayl bhgynjf jvyy unir cevinpl. iQEVAwUBQR/K2HcLPEOTuEwVAQHUVQf+M4/WdNVLqmBbLWpiu6AdrR4uZtxeLFSf AeT/jSW/OktUG/M2jUKFgftBcgAlKOZHQhDY60OK+pDQY3xZXIrNJHMWv/lq31iA W2kjZZopWp4HfYWAylhP2njKLpspihRnaWnN3XgNGQkxS5BjW9+YRzwRKsyq/VBt e8PSi9Jn2j6pFnZyl60Xfz9BeZ+S3QB6711ZhHfE/V5IFoh5Jd4lVqxKM0wT1MpN ku1SKNW334E2mWXPu49mCJ0/kGdd9soFLMHCW7QGmBybLWrSMG2PzYUYqb8H7rvL 4iVCLnCHcW3xxnm2Tt1nOGL+GlejOpg4n17HJuuFzOx5XqyQtJVBFA== =ofRk -----END PGP SIGNATURE-----