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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:55:00+00:00 2026-05-25T11:55:00+00:00

In my program I have a pointer to a std::list object, it is allocated

  • 0

In my program I have a pointer to a std::list object, it is allocated like so.

d_list_p = new std::list<some_type*>();

Then later in my program I delete it like so.

d_list_p->clear();
delete d_list_p;

For some reason I’m getting a Windows breakpoint triggered on the delete statement. If I break at the delete statement I see that the list exists and has a size of 0. Also, I never add an element to the list for the case that throws an error (I think).

The code is being compiled with the MS VC++ compiler for VS2005.

The error message says Windows triggered a breakpoint indicating memory corruption. The stack trace says the following.

ntdll.dll!DbgBreakPoint()   
[Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll] 
ntdll.dll!RtlpNtMakeTemporaryKey()  + 0x6735 bytes  
ntdll.dll!RtlpNtMakeTemporaryKey()  + 0x6b72 bytes  
ntdll.dll!RtlpNtMakeTemporaryKey()  + 0x7d5a bytes  
ntdll.dll!LdrAlternateResourcesEnabled()  + 0x33bd bytes    
ntdll.dll!RtlpUnWaitCriticalSection()  + 0x65b bytes    
msvcr80.dll!free()  + 0xcd bytes    
FM_Access_Library_NET.dll!std::list<FM_Access_Library::Logger_Callbacks *,std::allocator<FM_Access_Library::Logger_Callbacks *> >::`scalar deleting destructor'()  + 0x20 bytes C++

It is probably worth mentioning that this delete statement is in C++ code that is being built into a .NET DLL, so the program is running in mixed-mode.

  • 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-25T11:55:01+00:00Added an answer on May 25, 2026 at 11:55 am

    Is d_list_p a member of a class? And, does that class observe the Rule of Three?

    If not, then (a copy of) d_list_p may have already been deleted.

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

Sidebar

Related Questions

I'm new to std::generate and have attempted to structure a program which uses it
I have a pointer of a structure type that I made. On program start
In an embedded program I have a screen object that needs to manage a
Possible Duplicate: Does std::list::remove method call destructor of each removed element? I have a
I have created a vector of class objects. The following program crashes with Pointer
I am using boost shared pointers in my program, and I have a class
I have program that has a variable that should never change. However, somehow, it
I have program, that must interact with a console program before my program can
I have program that runs fast enough. I want to see the number of
Most program languages have some kind of exception handling; some languages have return codes,

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.