-
Notifications
You must be signed in to change notification settings - Fork 43
The CGALObject
Justin edited this page Feb 25, 2022
·
3 revisions
This page refers to the CGALObject class found in the CGALDotNet namespace.
The CGALObject acts as a base object for CGALDotNet and contains a number of utility functions.
This is the managed object that contains a C# pointer to the unmanaged CGAL object and is responsible for releasing any allocated memory using the dispose pattern.
This object can be disposed manually if required like so.
var poly = new Polygon2<EEK>();
poly.Dispose();
if(poly.IsDisposed())
{
//polygon is disposed
}
Once the object is disposed its pointer memory is cleared and if the object is used again a exception will be thrown.
A Print function is also provided as a means to print to the console any relevant information about the object.
// print some information about the object.
polygon.Print();