This is a symptom of using temporary tables. We could just require the calculation functions to drop them, but seems like we can handle this through a base method. This method creates the temporary tables and returns the name which it stores internally. Then it has a cleanup() method that drops those tables for the user.

These tables need to be dropped as they take up memory. Generating unique table names isn't enough