ggiGARelease finds the internal resource corresponding to the resource in reqlist referenced by handle, deallocates it, and then removes the resource from reqlist. Resources of type GA_RT_FRAME are simply removed, unless they are the last such in the list, in which case they represent the active video mode and cannot be removed (requests to do this are ignored.)
ggiGAReleaseList does the same for all the resources in reqlist.
Care must be taken that the reqlist used has not been altered with any "Add" functions since it was used to set the mode, or that it is a result list that was gotten during or since the last call to ggiGASet or ggiGARelease, in which case the handle must belong to said result list.
Returns 0 on success, or an error code if the removal fails or the supplied parameters are invalid.
Example 1. ggiGARelease/ggiGARelease Example
ggi_visual_t vis; ggiGA_resource_list request, result; ggiGA_ResourceProperties props; ggi_mode mode; ggiGA_resource_handle req, res; ggiInit(); vis = ggiOpen(NULL); ggiGAAttach(vis); ggiCheckMode(vis, 640, 480, 640, 480, &mode); props.size.x = 320; props.size.y = 200; props.graphtype = GT_AUTO; ggiGAAdd(&request, &props, GA_RT_VIDEO_MOTION, &req); ggiGAAddMode(vis, &request, mode, NULL, NULL); if (ggiGACheck(vis, request, &result)) { print("Check failed\n"); autopsy(result); } else if (ggiGASet(vis, request, &result)) { print("Unexpected failure to Set\n"); autopsy(result); } ggiGARelease(vis, request, req); /* Or: res = ggiGAHandle(result, request, req); ggiGARelease(vis, result, res); */ ggiGADetach(vis); ggiGAExit(); ggiExit();