When I execute the script below, I lose about 50 bytes of free memory each time through the outer loop. If I comment out the inner loop (lines in blue), no leak.
This is as simple as I could get the example and still have it leak. Does it look like there is anything wrong with the code, or is SL just leaking? Sample output at the bottom.
Thanks for any ideas (including any workarounds)!
CODE
default {
state_entry() {
key ownerKey ;
key prevOwnerKey ;
integer count = 0 ;
while (count < 8) {
ownerKey = "a12e2fe7-ffe3-0827-6e34-012eac7d6ce9" ;
prevOwnerKey = ownerKey ;
while (ownerKey == prevOwnerKey) {
prevOwnerKey = ownerKey ;
count++ ;
// artificially change owner every time
if (count % 2 == 0)
ownerKey = "deba040f-23da-adf4-45c7-df681aa1d39b" ;
else
ownerKey = "95d0d24c-deae-2e62-d084-a3c9dd6643a3" ;
} // while same owner
llWhisper(0, (string) count + " free=" + (string) llGetFreeMemory()) ;
} // while more labels
} // state_entry
} // default
leaky object whispers: 1 free=15746
leaky object whispers: 2 free=15702
leaky object whispers: 3 free=15658
leaky object whispers: 4 free=15614
leaky object whispers: 5 free=15570
leaky object whispers: 6 free=15526
leaky object whispers: 7 free=15482
leaky object whispers: 8 free=15438