Difference between revisions of "Ar Null"

194 bytes added ,  08:11, 27 February 2015
arrays are NOT always cleaned up automatically! source- personal testing
imported>Odessa
(clarified)
imported>Odessa
(arrays are NOT always cleaned up automatically! source- personal testing)
 
Line 1: Line 1:
{{Function
{{Function
  |origin = NVSE
  |origin = NVSE
  |summary = Returns a constant, an invalid array. This is useful if you wish to specify that a variable which previously referred to an array should no longer refer to any array.  
  |summary = Returns a constant, an invalid array. This is used to clear up array variables when they are no longer necessary, such as when a script terminates.


Note that redundant arrays which are no longer referenced by any scripts or other arrays are deleted automatically, this is not a typical usage function.
As of NVSE 4.6.2, arrays defined in [[User Defined Function|UDF]] scripts are cleaned up automatically, <b>but those held in other scripts are not</b>. Therefore it is essential to use Ar_Null to clear any local array variables when other scripts terminate to avoid save game bloat.


  |name = Ar_Null
  |name = Ar_Null
Line 15: Line 15:
==See Also==
==See Also==
*[[Array Variable]]
*[[Array Variable]]
*[[Sv_Destruct]] (Equivalent to clear redundant [[String Variable|string variables]])
*[[Ar_Resize]]
*[[Ar_Resize]]
*[[Ar_BadNumericIndex]]
*[[Ar_BadNumericIndex]]
Anonymous user