End hook?

BlitzMax Forums/BlitzMax Programming/End hook?

Try:

OnEnd( fun() )