Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. damage after normal block( #24094)

damage after normal block( #24094)

Scheduled Pinned Locked Moved C / C++ / MFC
helpc++debuggingperformancequestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Sakhalean
    wrote on last edited by
    #1

    Hi All, I have declared a pointer type variable of DWORD type in CFormView type class. I am allocating memory using new DWORD[ records ]. And I am freeing the memory in the destructor using delete[]. But I am getting mfc exception damage after normal block( #24094)at hex address. Can any body give me reason why I am getting that exception? I am not able to trace the problem. Please help me.

    C M 2 Replies Last reply
    0
    • S Sakhalean

      Hi All, I have declared a pointer type variable of DWORD type in CFormView type class. I am allocating memory using new DWORD[ records ]. And I am freeing the memory in the destructor using delete[]. But I am getting mfc exception damage after normal block( #24094)at hex address. Can any body give me reason why I am getting that exception? I am not able to trace the problem. Please help me.

      C Offline
      C Offline
      Chris Losinger
      wrote on last edited by
      #2

      you have written past the end of the memory you allocated.

      image processing toolkits | batch image processing

      1 Reply Last reply
      0
      • S Sakhalean

        Hi All, I have declared a pointer type variable of DWORD type in CFormView type class. I am allocating memory using new DWORD[ records ]. And I am freeing the memory in the destructor using delete[]. But I am getting mfc exception damage after normal block( #24094)at hex address. Can any body give me reason why I am getting that exception? I am not able to trace the problem. Please help me.

        M Offline
        M Offline
        Malli_S
        wrote on last edited by
        #3

        You've written in the memory block beyond the allocated memory size. If you are using the pointer arithmetic, check for your logic for advancing through the items in the array. Check for your memory writing logic too...

        [Delegates]      [Virtual Desktop]      [Tray Me !]
        -Malli...! :rose:****

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups