Skip to content

Commit

Permalink
Add deallocate(this%comment) in the finalizer.
Browse files Browse the repository at this point in the history
  • Loading branch information
gha3mi committed May 7, 2024
1 parent 888d561 commit da0d8e4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pnm.f90
Original file line number Diff line number Diff line change
Expand Up @@ -629,10 +629,11 @@ end function get_format
!===============================================================================
!> author: Seyed Ali Ghasemi
!> license: BSD 3-Clause
!> Deallocates memory for the pixels of the PNM image.
!> Deallocates memory for the PNM image.
elemental pure subroutine deallocate_pnm(this)
class(format_pnm), intent(inout) :: this
if (allocated(this%pixels)) deallocate(this%pixels)
if (allocated(this%comment)) deallocate(this%comment)
end subroutine deallocate_pnm
!===============================================================================

Expand Down

0 comments on commit da0d8e4

Please sign in to comment.