All are gpre-generated, yes?
Stored in static variables - like:
static Firebird::IRequest*
fb_1121 = 0; /* request handle */
Released after attaching another database:
if (fbStatus->getErrors()[1] == isc_bad_req_handle) {
fb_1121->release(); fb_1121 = NULL; }
Or when exiting isql.