The only false positives I've ever seen from the CRT leak-checking happen when you allocate and delete memory in a static singleton. Apparently, the CRT initiates the leak-checking when a static...
At the risk of sticking my neck out, I wonder if I could give my two cents on the issue of the usage pointers vs. references discussed back in posts 5 through 9 of this thread? (Please excuse me if...
I have a dump file from a remote machine which I'm trying to debug. Both the remote machine and my debugger are using Windows 7 with Service Pack 1. The crashing program was built with...
Well, it largely boils down to what Paul McKenzie was saying in posts #18 and #19. It's the whole "undefined behavior" idea. If the random variable points outside the program's...
Actually, that is quite easy to do in a non-erroneous way, as long as you are careful not to access any member data or the v-table of the possibly NULL class. (MFC code did it...
Actually, I'm finding the posts from all three of you potentially useful. Unfortunately I've not had the opportunity to try any of these ideas yet four a couple...
I am trying to solve a knapsack problem in a time-critical application. I've found I can shave a couple dozen seconds off of some inputs with dynamic programming. The problem is, the...
Adding code to force the CRT to check the integrity of the heap before calling the DLL functions might help. I would do this by running it several times and, each time it crashes, add a call before...
From Lindley:
From Paul McKenzie:
I hadn't thought of simply just sorting an array of pointers to each row, rather than the rows themselves. For the size of the table of exclusions, I don't think...
The array I'm sorting contains indices into a table of statistical data. The indices describe regions within the table which should be ignored by the analysis performed by "MyRoutine". They have to...
Apparently vector is safely converted to a raw array, as long as the type is not bool. According to these pages new versions the ISO standard require it:
...
I have some code which needs to allocate a pointer to a list of arrays. The code which uses that pointer can throw exceptions. To prevent leaking the array, I would like to wrap the...
Thank you for your interest and response. Looking at it closer, I think you're right. I wrote this a couple of years ago and tried to pass everything around with pointers when possible and I'm...
I've just written my first move constructors and move assignment operators. They seem to compile just fine, but when I try to set a breakpoint inside them, the debugger acts like they don't...
I've just figured it out (sort of). Apparently the type information or function signature is lost in the tertiary operator, as if the choice between the two overloads is made apart from the type of...
A coworker is able to duplicate this nasty result with a divide-by-zero on his Windows 7 machine. If we go to Windows XP with VS2008, we instead get...