Changing the code doesn't change whether or not leaktrace detects any leaks, including putting the subroutine in the innermost loop. How could I do this without %haystack, since if there are actually no memory leaks I think that would probably be much less of a drag on my computer? & simpler is better imho. I'm open to anything that would work. The function no_leaks_ok says there aren't any leaks so I'm with you there but leaktrace -verbose says
leaked REF(0x24810cc) from quarticmod.pl line 42.<BR> 41: 42: $haystack{"$x, $y, $z"} = [ 43: poly_roots( SV = IV(0x24810c8) at 0x24810cc REFCNT = 1 FLAGS = (ROK) RV = 0x248101c SV = PVAV(0x247e750) at 0x248101c REFCNT = 1 FLAGS = () ARRAY = 0x24fdbe4 FILL = 2 MAX = 2 ARYLEN = 0x0 FLAGS = (REAL) Elt No. 0 SV = NV(0x1989d9c) at 0x248102c REFCNT = 1 FLAGS = (NOK,pNOK) NV = 2.6180339887499 Elt No. 1 SV = NV(0x1989f8c) at 0x248103c REFCNT = 1 FLAGS = (NOK,pNOK) NV = 1.5 Elt No. 2 SV = NV(0x1989f9c) at 0x248104c REFCNT = 1 FLAGS = (NOK,pNOK) NV = 0.381966011250106 leaked SCALAR(0x248104c) from quarticmod.pl line 42. 41: 42: $haystack{"$x, $y, $z"} = [ 43: poly_roots( SV = NV(0x1989f9c) at 0x248104c REFCNT = 1 FLAGS = (NOK,pNOK) NV = 0.381966011250106 leaked SCALAR(0x248103c) from quarticmod.pl line 42. 41: 42: $haystack{"$x, $y, $z"} = [ 43: poly_roots( SV = NV(0x1989f8c) at 0x248103c REFCNT = 1 FLAGS = (NOK,pNOK) NV = 1.5 leaked ARRAY(0x248101c) from quarticmod.pl line 42. 41: 42: $haystack{"$x, $y, $z"} = [ 43: poly_roots( SV = PVAV(0x247e750) at 0x248101c REFCNT = 1 FLAGS = () ARRAY = 0x24fdbe4 FILL = 2 MAX = 2 ARYLEN = 0x0 FLAGS = (REAL) Elt No. 0 SV = NV(0x1989d9c) at 0x248102c REFCNT = 1 FLAGS = (NOK,pNOK) NV = 2.6180339887499 Elt No. 1 SV = NV(0x1989f8c) at 0x248103c REFCNT = 1 FLAGS = (NOK,pNOK) NV = 1.5 Elt No. 2 SV = NV(0x1989f9c) at 0x248104c REFCNT = 1 FLAGS = (NOK,pNOK) NV = 0.381966011250106 The size of haystack is 129 bytes. The size of haystack including references is 265 bytes. The size of wants is 36 bytes. The size of wants including references is 36 bytes.
In reply to Re^4: help with memory leak
by crunch_this!
in thread help with memory leak
by crunch_this!
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |