Adding a deallocation method for CAD pointer.

This commit is contained in:
shriwise 2018-02-23 11:22:12 -06:00 committed by pshriwise
parent cb45c97b70
commit 0df290f3a3
3 changed files with 16 additions and 2 deletions

View file

@ -41,3 +41,8 @@ void load_cad_geometry_c()
return;
}
void dealloc_cad_c()
{
delete DAGMC;
}

View file

@ -6,5 +6,6 @@
#include "surface.h"
extern "C" void load_cad_geometry_c();
extern "C" void dealloc_cad_c();
#endif // CAD_H

View file

@ -8,12 +8,20 @@ module cad_header
interface
subroutine load_cad_geometry_c() bind(C)
end subroutine load_cad_geometry_c
subroutine dealloc_cad_c() bind(C)
end subroutine dealloc_cad_c
end interface
contains
subroutine load_cad_geometry()
call load_cad_geometry_c()
end subroutine load_cad_geometry
subroutine dealloc_cad()
call dealloc_cad_c()
end subroutine dealloc_cad
end module cad_header