It's better to use some statically allocated functions instead of dynamically allocating them all the time.