i was trying to create a deque, and when the function that resizes the array is excuted, it crashes with the error from the title, and when i delete the deallocate() it stops happening, what im doing wrong? code: https://pastebin.com/0yHHcLnj

  • ratatosk@feddit.de
    link
    fedilink
    arrow-up
    0
    arrow-down
    1
    ·
    edit-2
    1 year ago

    Double free corruption means you deallocate some memory twice.

    Let me add a question: do you really want to implement your own deque? Because there already exists one in the STL.