MemCheck
To run this you need to enable debug, turn off optimization, and link debug info. As a result
400 KB Normal exe 404 KB exe with optimization turned off and stack frames enabled 2,903 KB exe with TD32 debug info linked
Access Violation
TKADaoDatabase.F_Get_SystemDatabaseFromRegistry Var Reg : TRegistry; Result:=Reg.ReadString('SystemDB'); // This line failswhich calls
function CallerIsNewAnsiString: boolean;in MemCheck.pas (using Delphi 5). A comment in the code states
//this can happen when there are no stack frames
The solution is the select
Note: This is not an issue with KADao components, it applies to any code compiled without stack frames - I'm just using KADao as an example.
Author: Robert Clemenzi - clemenzi@cpcug.org