Understanding allocations - function returned by function

The performance tip about avoiding non-const global variables also applies to variables holding functions. Try

const func = make_func()
5 Likes