Table of Contents

Event OnBeforeDocumentClear

Namespace
VectorDraw.Professional.vdObjects
Assembly
VectorDraw.Professional.dll

Event is Fired before vdDocument object is cleared.

Overwrite it in order to do additional clear of other custom user resources

public event vdDocument.BeforeDocumentClearEventHandler OnBeforeDocumentClear

Returns

vdDocument.BeforeDocumentClearEventHandler
Event is Fired before vdDocument object is cleared. Overwrite it in order to do additional clear of other custom user resources

Examples

Free memory from some user custom data associated with the document.

documnet.OnBeforeDocumentClear += Doc_OnBeforeDocumentClear;
object myCutomData = new data[100000];
private void Doc_OnBeforeDocumentClear(vdDocument sender)
{
   myCutomData = null;
}
doc.New();//this will fire the OnBeforeDocumentClear event and free the memory from myCustomData array before clear the document.
// -or- doc.Open("file.vdml");//this will fire the OnBeforeDocumentClear event and free the memory from myCustomData array before open the new file and clear the document.