Dead Code Stripping - Strip Unused Modules and Constants?

Does the dead code stripping in Xojo remove entire modules that are not used? For example, say I have a module DumbModule and it has 1 constant, DumbConstant … No where in my entire app is DumbModule.DumbConstant accessed, is any part of it included in the resulting executable?

The methods in the modules are stripped if not needed.

Christian, I am aware that the methods are stripped. Are you saying the constants are not?

normal constants are used in place when compiling…

No, it is not included, based on the following.

On Windows 7, Xojo 2014r2.1 in Desktop application, if a module “DumbModule” contains the below mentioned constant “DumbConstant” and that is not accessed in the application then the compiled Windows EXE does not contain that constant value when that EXE file is searched with UltraEdit text editor. However if the same “DumbConstant” is accessed in the application then the compiled Windows EXE does contain that constant value when that EXE file is searched with UltraEdit text editor.

String type “DumConstant” assigned a value of “1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890”.

As far as I see the dynamic constants are included always, even as being unused.

@Christian Schmitz, of course. I should have thought of that, thanks!

@Syed Hassan, thanks for double checking that.

and I filled feedback case: 35778 - Compiler does not strip out unused dynamic constants

If you build with earlier versions of RB (2007/2008) you will find it does a much better job at stripping unused constants and code. This is something I noticed a few months back when I started updating our code. I logged a couple of bugs at the time but so far there doesn’t seem to be any interest in fixing them.