Use callbacks in Arduino with pointers to functions (will functions persist in memory?)
Your functions won't cease to exist. All of the code in your compiled and linked code image gets loaded into code-memory (Flash) and it stays there throughout the run, through resets, and through power-cycles, until another image is loaded over it.
Are you confusing pointers to functions with pointers to a function's local variables which occupy RAM memory, specifically within the function's stack-frame which is transient, being created and &quot;destroyed&quot; as the function gets called and returns - and successive stack-frames won't necessarily be created in the same place.