So the problem that I ran into has not really happened yet. I am planning some code for the game that I am currently working on, and I know that I will need to save as much memory as possible from the first step.
My question is: if I have, for example, 500k objects that will need to be constantly built and deconstructed. Will I save memory so that the functions that these classes will use as function pointers. without function pointers
class MyClass
{
public:
void Update();
void Draw();
...
}
> for example, with function pointers
class MyClass
{
public:
void * Update;
void * Draw;
...
}
>
Will it save me some memory or will any new creation MyClass just get access to the same functions that were defined for the rest? If he saves me any memory, would that be enough to be useful?