I have a Voxel class that is created half a million times. I have reduced the amount of data that I use, but it just occurred to me that I’m not sure that functions take up memory in the same way as variables. How to find out the amount of space that a function performs in my program? More importantly, when I have 500 instances of a class, does this mean that I have 500 instances of a function?
I can guess that this is most likely not the case (excluding the built-in functions), but the explanation would be nice.
source
share