new function, and only load functions once.

the new function allows the freeprocessor to see when the program
is finished with a resource.