Difference between revisions of "Ns cleanup"

From AOLserver Wiki
Jump to navigation Jump to search
 
Line 13: Line 13:
 
'''DESCRIPTION'''
 
'''DESCRIPTION'''
  
: This command cleans up the current Tcl interp, performing various garbage collection tasks.  This command is invoked by the [[Ns_TclDeAllocateInterp()]] C function ''(when?)''.
+
: This command cleans up the current Tcl interp, performing various garbage collection tasks.  This command is invoked by the [[Ns_TclDeAllocateInterp()]] C function at interpreter deallocation (aka cleanup) time (i.e. at the end of each request or scheduled procedure execution).  This is a Tcl procedure defined in bin/init.tcl and it calls other procs in that file to clear global variables, release database handles, close all open files, etc.
  
: When would you ever want to use this?  ''([[Dossy]]: I assume this isn't a rhetorical question.  You would want to use this when you need to clean up the current Tcl interpreter.  Most common case would be in a non-connection thread, where ns_cleanup isn't automatically invoked for you.)''
+
: You should never need to call this procedure directly unless you want to manually clear your current interpreter without running the full deallocate/allocate traces using [[ns_ictl]] facilities.
  
 
'''SEE ALSO'''
 
'''SEE ALSO'''

Latest revision as of 01:44, 18 June 2010

Man page: http://aolserver.com/docs/tcl/ns_cleanup.html


NAME

ns_cleanup - Clean up the current Tcl interpreter

SYNOPSIS

ns_cleanup

DESCRIPTION

This command cleans up the current Tcl interp, performing various garbage collection tasks. This command is invoked by the Ns_TclDeAllocateInterp() C function at interpreter deallocation (aka cleanup) time (i.e. at the end of each request or scheduled procedure execution). This is a Tcl procedure defined in bin/init.tcl and it calls other procs in that file to clear global variables, release database handles, close all open files, etc.
You should never need to call this procedure directly unless you want to manually clear your current interpreter without running the full deallocate/allocate traces using ns_ictl facilities.

SEE ALSO

ns_init, ns_markfordelete

-