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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T23:55:36+00:00 2026-05-20T23:55:36+00:00

I am using Visual Studio 2005. While debugging code I am getting following error

  • 0

I am using Visual Studio 2005. While debugging code I am getting following error message and after that it is adding break,

Debug Error !
Program :-
Heap Corruption detected : after normal block c#2368 at 0x01d21e30. CRT detected that the application wrote memory after end of heap buffer.

Above error comes on the line

delete values[i];

where values is a vector of (const wchar_t *).

Anybody having idea where this error coming from?

  • 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-20T23:55:36+00:00Added an answer on May 20, 2026 at 11:55 pm

    This is for sure the result of a buffer write overflow. That means at some place you are writing more chars to a buffer than is allocated for it.

    You could use std::wstring instead of plain buffers which would eliminate the need for you to manage the buffers for you. Verify each write operation to the buffers.

    The overflow is detected on deletion as the heap manager then checks for some pattern at the beginning and the end of the buffers in debug mode.

    As others suggested also take care of matching allocation and deallocation:

    • new [] -> delete []
    • new -> delete
    • malloc -> free (which is C and is usually not really of a big use in C++)
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Whenever I save code while using Visual Studio 2005, an MS-DOS window fills the
Using Visual Studio 2005, I wrote a simple DLL in C that uses the
While developing and ASP.NET application in C# or VB using Visual Studio 2005/2008/2010 (Not
I am using VS 2005 and while editing a css border property, Visual Studio
I have been coding using Visual Studio 2005, in VB.NET for a while. No
Using Visual Studio 2005, the debugger tells me that a deadlock has occurred just
Using Visual Studio 2005 As per the title; MSDN and google can't tell me,
(Using Visual Studio 2005 / .NET 2.0) I have a DataSet which is being
I am using visual studio 2005 for c++ this summer, but I am still
We've been using Visual Studio 2005 Team Suite for a fairly large web project.

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.