Destroy a data frame and free all memory
Deallocates all columns and resets the data frame to uninitialized state
@param[in,out] this The data frame instance
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(data_frame), | intent(inout) | :: | this |
subroutine df_destructor(this) class(data_frame), intent(inout) :: this integer :: i if (allocated(this % data_cols)) then do i = 1, size(this % data_cols) call this % data_cols(i) % destroy() end do deallocate (this % data_cols) end if if (allocated(this % headers)) deallocate (this % headers) this % num_cols = 0 this % with_headers = .false. this % initialized = .false. end subroutine df_destructor