def clean(self):
        """Deallocates the fortran-managed memory that this ctype references.
        """
        if not self.deallocated:
            #Release/deallocate the pointer in fortran.
            method = self._deallocator()
            if method is not None:
                dealloc = static_symbol("ftypes_dealloc", method, self.libpath, True)
                if dealloc is None:
                    return
                arrtype = ndpointer(dtype=int, ndim=1, shape=(len(self.indices),), flags="F")
                dealloc.argtypes = [c_void_p, c_int_p, arrtype]
                nindices = require(array([i.value for i in self.indices]), int, "F")
                dealloc(byref(self.pointer), c_int(len(self.indices)), nindices)

        self.deallocated = True
def clean ( self ) : if not self . deallocated : method = self . _deallocator ( ) if method is not None : dealloc = static_symbol ( "ftypes_dealloc" , method , self . libpath , True ) if dealloc is None : return arrtype = ndpointer ( dtype = int , ndim = 1 , shape = ( len ( self . indices ) , ) , flags = "F" ) dealloc . argtypes = [ c_void_p , c_int_p , arrtype ] nindices = require ( array ( [ i . value for i in self . indices ] ) , int , "F" ) dealloc ( byref ( self . pointer ) , c_int ( len ( self . indices ) ) , nindices ) self . deallocated = True
Deallocates the fortran-managed memory that this ctype references.