destroys a StopWatch
subroutine destroy_watchgroup (handle, 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:
type (watchgroup) g1, g2
call destroy_watchgroup(g2, errcode)
The first call destroys the group g1. The second call destroys the group g2 and returns a status code.