in reply to Re^3: Shrunk array takes more memory than original
in thread Shrunk array takes more memory than original
Because using $#array causes some magic to be attached to the array.Technically speaking, a temporary magic object is created that points to the array. When the object is assigned to, it truncates the array. This object is freed (well, returned to the pool anyway) at the end of the statement. The array itself never gains any magic.
Dave.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Shrunk array takes more memory than original
by BrowserUk (Patriarch) on Nov 10, 2015 at 13:16 UTC |