LEADTOOLS Annotations (Leadtools.Annotations assembly) Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.3.29
Dispose() Method
See Also 
Leadtools.Annotations Namespace > AnnObject Class > Dispose Method : Dispose() Method



The Dispose() Method is available in LEADTOOLS Document and Medical Imaging toolkits.

Releases the resources used by the AnnObject.

Syntax

Visual Basic (Declaration) 
Overloads Public Sub Dispose() 
Visual Basic (Usage)Copy Code
Dim instance As AnnObject
 
instance.Dispose()
C# 
public void Dispose()
C++/CLI 
public:
void Dispose(); 

Example

This example frees all container resources.

Visual BasicCopy Code
Public Sub AnnObject_Dispose(ByVal container As AnnContainer)
   Do While container.Objects.Count > 0
      Dim obj As AnnObject = container.Objects(0)
      container.Objects.RemoveAt(0)
      obj.Dispose()
   Loop
End Sub
C#Copy Code
public void AnnObject_Dispose(AnnContainer container)
{
   while(container.Objects.Count > 0)
   {
      AnnObject obj = container.Objects[0];
      container.Objects.RemoveAt(0);
      obj.Dispose();
   }
}

Requirements

Target Platforms: Microsoft .NET Framework 2.0, Windows 2000, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7

See Also

Leadtools.Annotations requires a Document or Medical toolkit license and unlock key. For more information, refer to: Imaging Pro/Document/Medical Features