Delete a pointer that represents cdt2.
cdt2_delete(ptr,"ptr") cdt2_delete()
Given a pointer ptr of cdt2, cdt2_delete(ptr,"ptr") frees the memory hold by the pointer ptr and clears ptr in Scialb interpreter. if no parameters are given to cdt2_delete(), then all pointers of differents cdt2 will be deleted.
x = rand(1,10); y = rand(1,10); new_x = rand(1,10); new_y = rand(1,10); //example 1: C=[8. 2. 7. 4.;6. 4.5 4. 5.;3. 6. 3. 7.;3. 4. 2. 3.;9. 4. 8. 7.]; [tri,ptr] = constrained_delaunay_2(x,y,C); cdt2_insert_points(ptr,new_x,new_y); new_tri = cdt2_get_connectivity(ptr); cdt2_delete(ptr,"ptr"); // ptr is deleted here and cleared from scilab interpreter. ptr //example 2: [tri1,ptr1] = constrained_delaunay_2(rand(1,10),rand(1,10),[]); clear ptr1; // ptr is not yet defined in scilab interpreter, but the memory is not freed. cdt2_delete(); // all pointers of cdt2 will be deleted. | ![]() | ![]() |
The function above uses the Triangulation_2 package of CGAL, which is under QPL license.License Terms