Memory Leak and user 42

Source: Internet
Author: User
User 42 commonly occours if you are:

1. Trying to delete an object that is already deleted. (If two classes share a pointer, make sure only one of them is the "owner" responsible for deleting it)

2. writeing outside the bounds of an array or similar, corrupting a pointer allocated next to it, that you then try to free. (For example an array as a member variable)

3. writeing outside the bounds of an array or similar, that is allocated on the heap, corrupting the heap cell after the array, causing user 42 when trying to delete that cell...

Alh summarizes three common causes from the "Memory Leak and user 42" post on newlc.
Address: http://www.newlc.com/topic-8935

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.