CLOSE PROCEDURE
Closes one or more procedure files, preventing further access and execution of its functions, classes, and methods.
Syntax
CLOSE PROCEDURE [<filename list>] | [PERSISTENT]
<filename list>
A list of procedure files you want to close, separated by commas. If you specify a file without including its extension, dBASE Plus assumes PRG. If you omit <filename list>, all procedure files not tagged PERSISTENT are closed, regardless of their load count.
PERSISTENT
When <filename list> is omitted, CLOSE PROCEDURE PERSISTENT will close all files, including those tagged PERSISTENT. Without the PERSISTENT designation, these files would not be affected.
Description
CLOSE PROCEDURE reduces the load count of each specified program file by one. If that reduces its load count to zero, then that program file is closed, and its memory is marked as available for reuse.
When you specify more than one file in <filename list>, they are processed in reverse order, from right to left. If a specified file is not open as a procedure file, an error occurs, and no more files in the list are processed.
Closing a program file does not automatically remove the file from memory. If a request is made to open that program file, and the file is still in memory and its source code has not been updated, it will be reopened without having to reread the file from disk. Use CLEAR MEMORY to release a closed program file from memory.
In a deployed application, it is not unusual to open program files as procedure files and never close them. Because of the event-driven nature of dBASE Plus, program files must remain open to respond to events. The memory used by a procedure file is small in comparison to the amount of system memory.
See SET PROCEDURE for a description of the reference count system used to manage procedure files. You may issue SET PROCEDURE TO or CLOSE PROCEDURE with no <filename list> to close all open procedure files, not tagged PERSISTENT, regardless of their load count.