Why is PDFView sample (for C++) reporting a memory leak on program exit?


It seems that when PDFView object is created, it results in a small
memory leak. Visual Studio reports memory leaks in the output window
after a program run in debug mode is complete. The leak can also be
seen when running the sample "PDFViewVC" program that comes with the

We tested PDFView class and we were not able to detect memory leaks
specifically related to PDFView class.

For example:

for (int i=0; i<1000; ++i) {
  PDFView *pView = new PDFView();
  delete pView;

... does not produce any memory leaks.

We did encounter some familiar 'leaks' of the program exit (~8 kb),
however these leaks are intentional (e.g. part of CRT singleton
objects) and they never grow in size.

Attached is the report generated using BoundsChecker (under VS2003).

In case you still believe there is a leak in PDFView class (or any
other class), please let us know and we will perform additional