O'Reilly logo

VB.NET Language in a Nutshell, Second Edition by Steven Roman PhD, Paul Lomax, Ron Petrusha

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

Erase Statement

Syntax

Erase arraylist
arraylist (required; String literal)

A list of array variables to clear

Description

Releases an array object. This is equivalent to setting the array variable to Nothing.

Rules at a Glance

  • Specify more than one array to be erased by using commas to delimit arraylist.

  • The Erase statement causes all memory allocated to arrays to be released.

Programming Tips and Gotchas

Once you use Erase to clear an array, it must be redimensioned with ReDim before being used again. This is because Erase releases the memory storage used by the array.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required