… | |
… | |
208 | attachable_free (pTHX_ SV *sv, MAGIC *mg) |
208 | attachable_free (pTHX_ SV *sv, MAGIC *mg) |
209 | { |
209 | { |
210 | attachable *at = (attachable *)mg->mg_ptr; |
210 | attachable *at = (attachable *)mg->mg_ptr; |
211 | assert (!(at->flags & attachable::F_BORROWED));//D//TODO//remove when stable |
211 | assert (!(at->flags & attachable::F_BORROWED));//D//TODO//remove when stable |
212 | at->self = 0; |
212 | at->self = 0; |
|
|
213 | // next line makes sense, but most objects still have refcnt 0 by default |
213 | at->refcnt_chk (); |
214 | //at->refcnt_chk (); |
214 | return 0; |
215 | return 0; |
215 | } |
216 | } |
216 | |
217 | |
217 | static MGVTBL vtbl_attachable = {0, 0, 0, 0, attachable_free}; |
218 | static MGVTBL vtbl_attachable = {0, 0, 0, 0, attachable_free}; |
218 | |
219 | |