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... 来自在 NewLC 上的一个帖子“Memory Leak and USER 42”中,alh 总结了三条常见原因。 地址:http://www.newlc.com/topic-8935
Memory Leak and USER 42
最新推荐文章于 2023-07-06 10:39:36 发布