consider the following four conditions:
case 1: allocatable variable contains allocatable subobject
type :: testype2 type(testype1),allocatable, dimension(:) :: tt1 end type testype2 type(testype2), allocatable, dimension(:) :: tt2
case 2: allocatable variable contains pointer to subobject
type :: testype2 type(testype1),pointer, dimension(:) :: tt1 end type testype2 type(testype2), allocatable, dimension(:) :: tt2
case 3: pointer variable contains allocatable subobject
type :: testype2 type(testype1),allocatable, dimension(:) :: tt1 end type testype2 type(testype2), pointer, dimension(:) :: tt2
case 4: pointer variable contains pointer to subobject
type :: testype2 type(testype1),pointer, dimension(:) :: tt1 end type testype2 type(testype2), pointer, dimension(:) :: tt2
if I want to deallocate variable tt2, will all the space tt1 occupied will be free? or should i do something in the testype2 final procedure?
Thank you for your help!



