Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 552789
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T11:32:14+00:00 2026-05-13T11:32:14+00:00

I have an automation object with event support that leaks memory. The FConnectionPoints which

  • 0

I have an automation object with event support that leaks memory. The FConnectionPoints which comes with the generated source is never freed. When I manually add FConnectionPoints.Free in the destructor, the leak goes away.

I am on Delphi 7, using a FastMM BorlandMM.dll and FastMM_Fulldebugmode.dll.

Steps to reproduce:

  1. Start a new ActiveX Library project
  2. Add a new Automation Object: Name = TestObject; Check “Generate Event support code”
  3. Open the TypeLibrary, add a method to ITestObject, add an event to ITestObjectEvents
  4. Refresh, code will be generated.
  5. Add ShareMem as the first unit in your .dpr file
  6. Save, compile and register this ActiveX Server (Run menu)
  7. Start a new Application project
  8. Put ShareMem as the first unit in your .dpr file
  9. Import Type Library unit: create the unit from the dll you’ve just created in step 6, and check “Generate Component Wrapper”
  10. In your FormCreate add the following code:

code:

var
  lTest: TTestObject;
begin
  lTest := TTestObject.Create(nil);
  try
    lTest.ConnectKind := ckNewInstance;
    lTest.Connect;
    lTest.Disconnect;
  finally
    lTest.Free;
  end;
end;

Now compile, run and close this application. A memoryleak will be reported.

Question:

Is this a bug in the Delphi code template, am I doing someting wrong, or is it intended to free FConnectionPoints yourself (the help doesn’t mention it)?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T11:32:14+00:00Added an answer on May 13, 2026 at 11:32 am

    I found this issue to be reported in Quality Central report #1480.

    A Sysop asked me to create a new report so I did: report #81288.

    This also answers my question: it is a bug in the code template.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 274k
  • Answers 274k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Here is the answer, sorry .. but your solutions weren't… May 13, 2026 at 2:16 pm
  • Editorial Team
    Editorial Team added an answer Since you have a link in there, why not use… May 13, 2026 at 2:16 pm
  • Editorial Team
    Editorial Team added an answer If you do not care a minor performance loss, use… May 13, 2026 at 2:16 pm

Related Questions

The Question My question is: Does C# nativly support late-binding IDispatch? Pretend i'm trying
I dig a lot of things about the DDD approach (Ubiquitous language, Aggregates, Repositories,
I have an issue with watin test that should browse for pdf and upload
I have a user who has to use Microsoft Word 2007 to create and
I'm trying to write a tool which lets me inspect the state of a

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.