Hi all,
I am getting some unreleased memory from the NIReport library using the code below.
Since I do not have the code of Nireport, I cannot see where the problem is coming from.
The main problem I have is that the leak is cumulative : X Bytes * number of call of GetAndFreePrinters.
Can anyone help ?
My Config is Meaurement Studio 6.0 FDS on Windows 2000.
Thanks in advance,
Farid.
#include "nireport.h"
#include
void GetAndFreePrinters (void);
void main()
{
GetAndFreePrinters();
CVIDynamicMemoryInfo ("Memory Content", NULL, NULL, DYNAMIC_MEMORY_SHOW_ALLOCATED_MEMORY);
}
void GetAndFreePrinters(void)
{
//From the Help of the function NIReport_GetPrinters
char **allPrinters;
char **printer;
NIReport_GetPrinters (NULL, &allPrinters);
printer = allPrinters;
while (*printer != NULL)
NIReport_FreeMemory (*printer++);
NIReport_FreeMemory (allPrinters);
}