Here is an overview of the processing that is causing this.
I have a function I wrote named fGetQuestions. This function is very complex, but one of the things it does is create several TEMP tables. Here is a snipit of code that does it:
drop table if exists temp_rslt;
drop table if exists campuslocation_rslt;
drop table if exists final_rslt;
create temporary table temp_rslt of ypxportal2__fgetquestions on commit drop;
create temporary table campuslocation_rslt of ypxportal2__fgetquestions on commit drop;
create temporary table final_rslt of ypxportal2__fgetquestions on commit drop;
[...]
Is there anything I can do to make sure that when fGetQuestions returns to mikes_fget_questions_tester() that all of the fGetQuestions resources are freed?
Maybe try losing the DROP TABLES and just do:
CREATE TEMP TABLE ... IF NOT EXISTS ... ON COMMIT DROP;