I'm not sure why you need this function.  This file tries to maintain an invariant that offscreen frames are in the reset state. When a frame transitions offscreen (see nextFile() and previousFile(), it is reset).  I'm not sure why this code is here, but I think you might just be able to do currentFrame.reset() if you really need to reset something.

If you are trying to save memory by releasing all the images, you should use clear() instead of reset().