Unused variables and functions

 

I want to know whether "Unused variables" are removed from compiled .ex4 file? (There is a warning for uninitialized variables not being used, but I found nothing about their removal from compiled .ex4 file)

What about unused functions, in previous version there was a message during compilation informing developer about removal of such functions.

 
Mohammad Mohi:

I want to know whether "Unused variables" are removed from compiled .ex4 file? (There is a warning for uninitialized variables not being used, but I found nothing about their removal from compiled .ex4 file)

What about unused functions, in previous version there was a message during compilation informing developer about removal of such functions.


My concern is memory management.
 
Mohammad Mohi:

I want to know whether "Unused variables" are removed from compiled .ex4 file? (There is a warning for uninitialized variables not being used, but I found nothing about their removal from compiled .ex4 file)

What about unused functions, in previous version there was a message during compilation informing developer about removal of such functions.

Unused functions are automatically removed from the ex4.
 

What about unused uninitialized variables?

I couldn't identify that, with the file size of compiled .ex4 because every single compiled file has different size!

No change in .mq4 file but .ex4 file has different file size after each compilation!

 
Mohammad Mohi:

What about unused uninitialized variables?

I couldn't identify that, with the file size of compiled .ex4 because every single compiled file has different size!

No change in .mq4 file but .ex4 file has different file size after each compilation!

Why do you care about that ? Remove your unused variables, that's all.
 
Agreed, remove them. Why do you care about a few hundred extra bytes (if any) when you run on a 5+ gigabyte machine?