Extensions Destroy

void array:destroy ( )

Cleans up the array object and releases its allocated memory.  Any further operations on the object after calling destroy will have no effect.  If the object itself is naturally collected by the garbage collector, then the internal allocated memory will also be released at that time.

Parameters

None.

Return Values

None.

Example

-- Assume we have an array "arr"
arr:destroy()
 
-- Further actions have no effect
local val = arr[0]
assert(val == nil)

Copyright 2010 Justin Aquadro