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 3271824
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T18:45:56+00:00 2026-05-17T18:45:56+00:00

actually i am using late-binding in delphi, and i need to know wich is

  • 0

actually i am using late-binding in delphi, and i need to know wich is the proper way to work with it.

My principal concern is about how I handle the memory used by these objects, I must free the memory?

check this sample code

var
  chEaten: Integer;
  BindCtx: IBindCtx;
  Moniker: IMoniker;
 MyObject:: IDispatch;
begin
try  
  OleCheck(CreateBindCtx(0, bindCtx));
  OleCheck(MkParseDisplayName(BindCtx, StringToOleStr('oleobject.class'), chEaten, Moniker));
  OleCheck(Moniker.BindToObject(BindCtx, nil, IDispatch, MyObject));

  MyObject.Metod1();
  MyObject.Metod2();
 finally
 MyObject:=nil,// is  this necesary?
 end;

end;

would be helpful if someone explain briefly how is handled the memory in this type of objects.

thanks in advance.

  • 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-17T18:45:56+00:00Added an answer on May 17, 2026 at 6:45 pm

    COM Interface objects in Delphi are automatically managed by the compiler. It inserts hidden calls to AddRef and Release at the appropriate places, and your interfaces will automatically have their Release methods called when they go out of scope. So no, you don’t have to nil out the reference.

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

Sidebar

Related Questions

I'm trying to handle Winsock_Connect event (Actually I need it in Excel macro) using
Actually, I'm using this way. Do you have a better way? private bool AcceptJson(HttpRequest
I'm actually developing a Web Service in Java using Axis 2. I designed my
We're creating a web system using Java and Servlet technology (actually Wicket for the
I am actually working on SP in SQL 2005. Using SP i am creating
I've never actually used greasemonkey, but I was considering using it. Considering that GreaseMonkey
How to detect IIS version using C#? Update: I meant from a winapp (actually
Have you ever worked on a (full-time) project where using Agile methodologies actually allowed
I am actually using Rails 3.0, so it is rails console vs rails runner
I'm sure this is not a very pythonic situation. But I'm not actually using

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.