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

  • Home
  • SEARCH
  • 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 8766311
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T16:31:10+00:00 2026-06-13T16:31:10+00:00

I am using Delphi XE. I have come across a memory leak problem using

  • 0

I am using Delphi XE. I have come across a memory leak problem using Delphi Soap. It turns out to be due to a missing .Free call in TWSDLLookup.Destroy, as described in QC 91160

The problem that I have is the described work-around, which is simply to add FLookup.Free to the TWSDLLookup.Destroy method.
I don’t want to change the Delphi source, so I tried copying the unit to my project folder, making the change and recompiling, as described here in Tom’s answer. The problem with this technique is that it apparently only works if you also recompile all the dependent units. I have tried copying just WSDLLookup.pas to my project directory and I get a Stackoverflow error. I’m not familiar with Web Services / SOAP so I don’t know what other units I should copy over if I do use this technique.

Rob Kennedy’s answer on the same page describes a different technique involving code hooking – but it doesn’t seem to apply to object methods. I have done as he suggests and downloaded the free code for the TNT Unicode controls and located the relevant procedures, but I have been unable to find info on how to hook an object’s methods – if indeed this is possible. If I could do this, I would then hook TWSDLLookup.Destroy and add the FLookup.Free call.

Any ideas for how to fix this will be much appreciated. I’m a bit of a newbie programmer so I’m hoping that I’ve missed something obvious?

  • 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-06-13T16:31:11+00:00Added an answer on June 13, 2026 at 4:31 pm

    What you are trying to do does in fact work fine. I tested it out myself. Here’s the project file I used:

    program WSDLLookupTest;
    
    {$APPTYPE CONSOLE}
    
    uses
      WSDLLookup in 'WSDLLookup.pas';
    
    var
      intf: IInterface;
    
    begin
      intf := GetWSDLLookup as IInterface;
    end.
    

    I made a copy of the WSDLLookup.pas file and placed it in the same directory as the .dpr file. Then, in the copy rather than the original, I modified TWSDLLookup.Destroy.

    destructor TWSDLLookup.Destroy;
    begin
      Beep;
      ClearWSDLLookup;
      FLookup.Free;
      inherited;
    end;
    

    I added the Beep to prove to myself that this code was indeed being executed.

    In your position I would definitely use this solution instead of attempting code hooks. And of course the other simple solution is to upgrade to a later Delphi version.

    One thing to be careful of is to remember to remove the modified unit when you do upgrade. The leak was fixed in XE2.

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

Sidebar

Related Questions

I'm using Delphi 2010 on Windows 7 and have a problem with single quotes
I have started using of generics in Delphi 2010 but I have a problem
I have just started a new project, and I am using the Delphi 2009
I have a Delphi 2009 application that runs a query over a database using
I have developed an database application with Delphi XE2 using an Access DB, now
I have developed a few Delphi Win32 (currently using D2007) applications, which revolve around
I have a lot of experience writing Delphi 6 Pro apps using the Skype
Hi I'm using Delphi and I have a StringList with this items: 45 A15
My application is written using : Embarcadero Delphi 2010 I have a form named
I'm using Delphi 2006. I have a few PNG images with transparencies and I

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.