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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T23:04:08+00:00 2026-05-24T23:04:08+00:00

I have following code (I checked objCur is not Nil before free}: try objCur.Free;

  • 0

I have following code (I checked objCur is not Nil before free}:

try
  objCur.Free;
Except on E:Exception do
  begin
    OutputDebugString(PChar('Exception '+E.Message));
    Assert(False);
  end;
end;

It report this exception message:

Invalid pointer operation. objCur is TXX_TEA type.
objCur: TXX_TEA;

In TXX_TEA.Destroy I have following code

destructor TXX_TEA.Destroy;
begin
  OutputDebugString(PChar('Inside Destroy'));
  ...
  inherited;
  OutputDebugString(PChar('End of Destroy'));
end;

In debugView I see following messages:

Inside Destroy
…
End of Destroy

Exception: Invalid pointer operation

I know objCur.Free calls TXX_TEA.Destroy, but it looks TXX_TEA.Destroy executes without error. So where should I trace this invalid pointer operation?

  • 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-24T23:04:09+00:00Added an answer on May 24, 2026 at 11:04 pm

    An invalid pointer operation occurs when the memory manager is asked to release memory that doesn’t belong to it.

    An object’s memory is freed just before the outermost destructor returns to the caller. The caller in this case is TObject.Free. Calling inherited does not cause an object’s memory to be freed because the compiler knows that it’s not the outermost call.

    Evidently, you’re freeing an object that doesn’t really exist, but the contents of the memory for this supposed object look valid enough that the code in the destructor that cleans up object’s fields doesn’t crash. It’s only when the destructors finish running, and the object is going to be freed, that the memory manager detects that the address doesn’t refer to anything currently allocated.

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

Sidebar

Related Questions

if i have a following code try{ //some code }catch(Exception e){ //some code }finally{
So I have the following JavaScript code: <script type=text/javascript> function clearRadioButtons() { document.getElementById(radiobutton1).checked=; //etc
We have following code: try { // some code throwing MyException } catch (MyException
I have the following code which enables a button when the checkbox is checked.
I have the following code, that inserts the processing instructions before root element: Document
I have the following code: $('#DoButton').click(function (event) { event.preventDefault(); $(input:checked).each(function () { var id
I have the following code. When the checkbox is checked (which is hidden), when
I have the following code: try { //Create connection SQLiteConnection conn = DBConnection.OpenDB(); //Verify
i have the following code in an asp.net-mvc view: <input checked=checked id=outputFilter name=outputFilter value=Detail
I have the following code which calls another function, i.e.: $('input[name='f01']:checked').each(function() { setCBCollection(this); });

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.