Thank you, Richard.
For everyone else, maybe a little more info, maybe there’s something to learn =) So here we go:
A year ago we discovered that using binary numeric operations in array/vector accessors caused a small but noticeable memory leak, regardless if only reading from the array/vector or assigning a value.
E.g.
array[(i += 2) % 3]
Someone at Adobe, I believe, commented that all numbers in AS3, even (unsigned) integers, were backed by a 64-bit wide float, which meant that even integers in numeric expression were internally converted to Number (float) before any calculations and were converted back to their original type afterwards. In the process, some memory was leaked, but only in array/vector accessors.
This was discovered only with high-fps update loops doing enough of such accessions to actually cause the Garbage Collector to throw in some extra shifts, which could be clearly be felt in a stuttering frame rate.
Only by chance it was discovered that an explicit typecast to int or uint, e.g.
array[uint((i += 2) % 3)]
did not cause any memory to leak.
As mentioned, this was already a year ago and my memory has seen better days So don’t nail me on any details I may have gotten wrong Back then it definitely was an issue which caused quite some code review. And I never noticed whether Adobe has taken care of that ever since.
Cheers!
Alex