destroy_watchgroup(3f) - [M_stopwatch] destroys a M_StopWatch watch group (LICENSE:PD)
Synopsis
Description
Diagnostics
Examples
Bugs
Author
See Also
subroutine destroy_watchgroup(handle, err)
type (watchgroup), intent(INOUT) :: handle integer, optional, intent(OUT) :: err
Destroys a watch group. Only the group is destroyed, not the watches in the group. To avoid memory leaks, watch groups should be destroyed when no longer useful, before being recreated, and before returning from a subroutine in which the watch group is a local variable.The argument handle is a variable of type watchgroup that is the handle for the group to be destroyed.
If present, the optional intent OUT integer argument err returns a status code. The code is the sum of the values listed below.An error message will be printed to a specified I/O unit (unit 6 by default) if print_errors is TRUE (default is TRUE). The error message contains more detail about the cause of the error than can be obtained from just the status code, so you should set print_errors to TRUE if you have trouble determining the cause of the error.
If abort_errors is TRUE (default is FALSE), the program will terminate on an error condition. Otherwise, the program will continue execution but the watch group will not be created.
See option_stopwatch(3) for further information on print_errors, abort_errors and I/O units.
The relevant status codes and messages are:
0 No errors; execution successful.
1024 Error occurred while deallocating memory. This error occurs if the Fortran deallocate statement returns a nonzero status while deallocating memory used for the group. The group is destroyed, but be aware that other problems could develop as a result of the deallocate error.
type (watchgroup) g1, g2 integer errcodecall destroy_watchgroup(g1) call destroy_watchgroup(g2, errcode)
The first call destroys the group g1. The second call destroys the group g2 and returns a status code.
None known.
William F. Mitchell, william.mitchell@nist.gov National Institute of Standards and Technology
M_stopwatch(3), create_watch(3), destroy_watch(3), end_pause_watch(3), inquiry_stopwatch(3), join_watchgroup(3), leave_watchgroup(3), option_stopwatch(3), pause_watch(3), print_watch(3), read_watch(3), reset_watch(3), start_watch(3), stop_watch(3)
M_StopWatch 1.1 | DESTROY_WATCHGROUP (3) | September 22, 2017 |