Allocating fresh blocks of memory is costly. It can slow
down your application or cause performance to lag during animation
or interaction as the garbage collection gets triggered.
Try to recycle objects whenever you can, rather than getting
rid of one and creating a new one.
Keep in mind that vector objects can consume less memory than
arrays. See
Vector class versus Array class
.
For more information on memory usage, see
Conserving memory
.
|
|
|