Hi

Hi,
As some of you might know, up to Delphi XE, the VCL leaks global Atoms. Which means everytime you start a VCL-Application, one new entry is added but never removed. YOur systems fails to run properly if the whole global Atom-Table is flooded (~32000 entries). As i have an Application which starts quite often on a permanent running system (this setting is not open for diskussion), i manage to flood the Table within a few days.

As a result i tried Andreas Hausladen  ControlsAtomFix.
http://andy.jgknet.de/blog/bugfix-units/vclfixpack-10/
(Fix for QC 90511 (Atom leak))

 However i fail on using it properly. The unit is right after Sharemem in my DPR. (Test switch enabled to see debugoutput of this unit)

If i do not compile with packages, it reports "Patch applied" but AtomMonitor still reports leaking Atoms. If i compile with VCL package, it reports "RegisterWindowMessageW import table slot not found" and leaks aswell.

I am using DelphiXE by the way.
http://andy.jgknet.de/blog/bugfix-units/vclfixpack-10

Comments

  1. PS: are you sure your unit runs before all other units?

    ReplyDelete
  2. Checked all that. My function is hooked and i can see it being called when the exe starts up. The values coming through look like this. The app then loads bpl at run time but nothing in this code ever calls the hooked procedure any longer.

    23/08/2016 15:26:24 Rich Text Format
    23/08/2016 15:26:24 RTF in UTF8
    23/08/2016 15:26:24 RTF with NCRs for nonASCII
    23/08/2016 15:26:24 RTF As Text
    23/08/2016 15:26:24 RICHEDIT
    23/08/2016 15:26:24 Object Descriptor
    23/08/2016 15:26:24 Embedded Object
    23/08/2016 15:26:24 Embed Source
    23/08/2016 15:26:24 Link Source
    23/08/2016 15:26:24 Rich Text Format Without Objects
    23/08/2016 15:26:24 RichEdit Text and Objects
    23/08/2016 15:26:24 FileName

    ReplyDelete
  3. if this is your log of hooked messages, your hook is added too late (RTL finished initialization of TApplication)

    ReplyDelete

Post a Comment