Release resources after loading an other pdf

Hi,

the following scenario makes me mad:

I loaded a pdf document looked at it and want to load an other pdf
document.
On the application side everything works fine.
The ofirst document is unloaded form and the second is loaded into the
viewer.

But If I try to change the name of the first document (via win
explorer) the os tells me the application still
holds a reference to the document.

What do I need to do to cut all references to a document after it had
been unloaded from the viewer?

Regards,
Jan

You would need to close (or dispose - it is the same thing) the
original document. Similar to PDFViewSimple sample (http://
www.pdftron.com/pdfnet/samplecode.html#PDFViewSimple).

For example:

PDFDoc old = pdfview.GetDoc();
pdfview.SetDoc(new PDFDoc(filename));
if (old != null) old.Dispose();