delphi xe disable RTTI

In short (full story provided by links in the splash's answer):

{$RTTI EXPLICIT METHODS([]) PROPERTIES([]) FIELDS([])}

Note that as of XE6 and newer, this needs to be in each individual unit for which you want to disable RTTI. Before that (XE5 and below) it could be in the DPR file and would apply to all units in the project.


Read the Online Help for Delphi ...

  • Working with RTTI
  • RTTI directive

... and search Stack Overflow:

  • Why should I care about RTTI in Delphi?
  • Practical usage for Delphi's new RTTI

Keep in mind that the $RTTI directive has to be included in every unit where it should take effect. See How can I set the $RTTI directive for the entire project?


Your problem is not related to RTTI. If you are talking about relatively small increase (100-200K), this is due to extra functions in RTL (added for Unicode support etc). If you get 500-700K increase or so, then check whether you link VCL UI units (Forms, Controls etc). If you get 3Mb increase, then you've turned on extra debug symbols.