I believe the issue is rooted in the use of
atexit(ofExitCallback); and
exit()
This means that the ofRunApp actually never returns execution to the main(). I forgot whether there was a reason for this. Seems to me too that either execution should come back to the main function or ofRunApp should be owning of the app pointer and make sure it is deleted when exiting.
This shouldn’t be a show stopper for you. Simply put all the clean up in the exit() method of testApp. If you don’t have one simply add one and it will be called when the app exits.