my questions were closed in the regular forum and I was redirected here, so here I am...
My question is how heavy are method variables?
I for example have a a object which requires its method to be defined in 3 different ways depeing on the data that goes into it, the difference is minor however and copy/paste that long block in 3 different switch cases is not the most readable code.... Is it worth making 3 sub methods instead in the switch cases and then insert them into the main method to have the main method more clean?
Will there be any performance nerf from having 4 methods instead of 1?
And also, does local and instance scope methods get removed when you detroy an object which owns them? And restting a global method to anyother value, does it remove all the code within it from memory or do I have to destroy the method somehow?
Thanks in advance.
Please sign in to leave a comment.