Saves a memory dump containing the memory resources that have been allocated and that have not been freed since the previous call to dbgStartMemoryDiff
This debugging method is used to isolate the memory resources of an operation that should be neutral for the memory. This allows you to correct the code and to add the potential missing freeing statements (queries no longer used, global object no longer used during the rest of the execution, etc.).
// Beginning of the memory diff
// before the operation that should be neutral for the memory
// Operation that should be neutral for the memory
// Save the memory dump
// after the operation that should be neutral for the memory
Saving the difference memory dump in the current dynamic audit
: This syntax saves the memory dump in the dynamic audit file if the audit is enabled. The function has no effect if the dynamic audit is not enabled.
Saving the difference memory dump in a file Hide the details
<Dump file>: Character string
Name of the file where the dump is saved. The name of the file can be built with the following elements:
If this parameter corresponds to an empty string (""):
|[%ExeDir%]||Directory of the executable, always filled with the "\" character. This directory is equivalent to the result of fExeDir.|
|[%Date%]||Start date of memory dump (YYYYMMDD format).|
|[%Time%]||Start time of the memory dump (HHMMSS format).|
|[%UserName%]||Name of the current user.|
|[%ComputerName%]||Name of the computer.|
|[%DataDir%]||Directory of the HFSQL data files specified by the user when installing the application. This directory is equivalent to the result of fDataDir.|
|[%DirUserData%]||Directory for the data of the current user of the current application. This directory is equivalent to the result of fDataDirUser.|
- The extension of the file will be ".wmem".
- The name of the created file corresponds to: "[%UserDataDir%][%ExeName%]_[%Date%]_[%Time%]".
For example: "C:\Users\Doc\AppData\Roaming\WINDEV Applications\MyApp\MyApp_20091023_130812.wmem".
Caution: If you use the dynamic string construction ("Allow "[% %]" in the strings" option in the "Compilation" tab of the project description), a compilation error occurs (unknown identifier). In this case, each string must be preceded by '-%'. Example: