C++ Builder try...catch blocks
Posted: Fri Nov 18, 2016 6:13 pm
I have a simple C++ Builder XE10.1 program with a single form and single button. The click event for the button is:
I run the program (with madExcept turned on) and after hitting the button (clicking the exception box) then exiting the application, I get an error reported from MadExcept that 2x28 blocks of memory were allocated and not freed. As far as I'm concerned, this shows an error with C++ Builder's exception handling.
I've looked elsewhere on the web and have found numerous references to this problem but no solutions. Is this truly a bug and if not, how do I get madExcept to ignore it?
Thanks for any help / suggestions. This thing is driving my crazy. I have a huge application that is reporting memory leaks when exceptions are created like the one in the code above.
Code: Select all
Button1->Enabled = false;
try {
throw Exception("Well crap, I have an exception");
}
catch (const Exception &E) {
ShowMessage("ERROR:\n\n" + E.Message);
}
I've looked elsewhere on the web and have found numerous references to this problem but no solutions. Is this truly a bug and if not, how do I get madExcept to ignore it?
Thanks for any help / suggestions. This thing is driving my crazy. I have a huge application that is reporting memory leaks when exceptions are created like the one in the code above.