Skip to Content

Memory leak in TAdsEvent component

As far as I can tell, the TAdsEvent component leaks memory.

Quick test to reproduce:

  • Drop a TAdsConnection onto a form
  • Set its AliasName to an existing Advantage alias
  • Drop a TAdsEvent onto the form
  • Set the AdsConnection property to The AdsConnection component
  • Edit the Events property to add one event - say "TestMsg"
  • Set the Active property to True
  • Run the application, using the FastMM memory manager to report leaks.

Results in the following memory leak being reported:

13 - 20 bytes: AnsiString x 1
29 - 36 bytes: Unknown x 2
45 - 52 bytes: TStringList x 2

(I also had trouble reporting this problem on the SAP support portal, as mentioned on StackOverflow, I hope this is a better place to get a response).

It looks to me like the Destroy() methods of both the TAdsEvent component and the TAdsEventReceiveThread need the following line added:

FEvents.Free;
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Aug 04, 2017 at 02:44 PM

    Hi Doug,

    Thank you for bringing this to our attention.

    I checked, and this is actually a known bug which has already been reported to development.

    I will make an internal note on the dev ticket informing them that more customers have experienced this issue.

    Regards,

    Matt

    Add comment
    10|10000 characters needed characters exceeded