in reply to Re^5: I have a list expanding when I don't want it to
in thread I have a list expanding when I don't want it to
I down-voted you.
Because you are telling her, how she should program her code.
And, (BTW) assuming (arrogantly) that she hasn't/didn't already profile both possibilities and choose appropriately.
No attempt to help her. Just see the word (fast/er/est) and knee-jerk into patronizing dick mode.
Assigning () to an array, causes the array to be emptied; but the AV* is retained; so is the hash key holding the reference to the AV*. Thus the HV* is unmodfied.
Deleting the key(s) from the hash, not only empties (GCs) the elements of the array and modifies the size of the AV*; it also modifies the hash by removing a key value pair, only to recreate it immediately.
She made the right choice. And I'm betting it wasn't by either guesswork or knee-jerk.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: I have a list expanding when I don't want it to
by Lady_Aleena (Priest) on Nov 20, 2014 at 03:51 UTC | |
|
Re^7: I have a list expanding when I don't want it to
by GrandFather (Saint) on Nov 20, 2014 at 03:34 UTC |