Neeraj Nair
Neeraj Nair

Reputation: 205

ByteArray using Actionscript 3

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

Answers (1)

Organis
Organis

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

Related Questions