Safe place to reset memory functions with main callbacks?

As a follow on from a previous question about initialising custom memory allocation functions, is there anywhere I can safely reset/free the memory I allocated for my custom allocator?

I tried at the very end of SDL_AppQuit but that causes a crash because SDL tries to free memory that has already been freed.

Using the callbacks, is there any way to make sure freeing this memory is the absolutely last thing that is done?

I went with not resetting the custom alloc functions at all. So I drop out of SDL_AppQuit without resetting them. No issues found. Btw, I just noticed Ryan has just now fixed something regarding SDL allocating memory before SDL_AppInit, which might help you.