Lotus C++ API fragmental leak

Hi

I tried put the the mailscan code (notescpp api) in an infinite while

int main ( int argc, char ** argv)

{

int ii = 0;

while (1)

{

  ii++;

  cout << ii << endl;

  read_mail(argc, argv);

  Sleep(100);

}

return 0;

}

the read_mail function code is the same as mailscan.c

When I execute this code It work fine but it eats 4 bytes of virtual memory.

The 4 bytes occurr when execute this code

CurDoc = DocArray[Index];

CurDoc.Open(LNNOTEOPENFLAGS_MARK_READ);

CurDoc.Close();

if I comment this code, the readmail work fine and don’t generate memory leaks and virtual memory leaks

Anyone can help me!

Thanks!