Skip to main content
1 of 2
Michel Keijzers
  • 13k
  • 7
  • 43
  • 59

The compiler/linker will remove unused functions/methods automatically, so I doubt you can save memory by removing unused functions/methods yourself.

However, you could possibly gain by:

  • Removing the calls of check functions/methods when you know the result will be always false, true, or always the same number, string or data type in general.
  • Removing (parts of) functions/methods which are related to physical or logical functionality you never use. Like e.g. if, case statements that will never apply).
Michel Keijzers
  • 13k
  • 7
  • 43
  • 59