# __MVXRELEASE()

This function releases value stored in PRIVATE or PUBLIC variable

Syntax

  __MVXRELEASE( <variable_name> )

Arguments

  <variable_name> = either a string that contains the variable's name or an one-dimensional array of strings with variable names No skeleton are allowed here.

Returns

  Nothing

Description

  This function releases values stored in memory variable. It shouldn't be called directly, rather it should be placed into RELEASE command. If the released variable is a PRIVATE variable then previously hidden variable with the same name becomes visible after exit from the procedure where released variable was created. If you access the released variable in the same function/procedure where it was created the the NIL value is returned. You can however assign a new value to released variable without any side effects.
  It releases variable even if this variable was created in different procedure

Examples

          PROCEDURE MAIN()
          PRIVATE mPrivate

            mPrivate :="PRIVATE from MAIN()"
            ? mPrivate     //PRIVATE from MAIN()
            Test()
            ? mPrivate     //PRIVATE from MAIN()

          RETURN

          PROCEDURE Test()
          PRIVATE mPrivate

            mPrivate :="PRIVATE from Test()"
            ? mPrivate           //PRIVATE from TEST()
            RELEASE mPrivate
            ? mPrivate           //NIL
            mPrivate :="Again in Test()"

          RETURN

Status

  Ready

Compliance

  This function is a Harbour extension

Files

  Library is vm