Reputation: 205
How to unload a ByteArray using ActionScript 3? From memory
I tried:
// non-working solution no.1
byteArray.length = 0;
byteArray = new ByteArray();
// non-working solution no.2
for ( var i:int=0; i < byteArray.length; i++ )
{
byteArray[i] = null;
}
Upvotes: 0
Views: 105
Reputation: 7316
Working solution №1 per official documentation: https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/utils/ByteArray.html#clear()
byteArray.clear();
Upvotes: 1