Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
Important Update: Community Platform Migration​. Learn more​>

Memory Deallocation

bbeyer
Novice
1,901 Views
When using the new feature of allocatable elements within derived types such as:
type sample
real*8, allocatable :: x(:)
end type
type(sample), allocatable :: test(:)
When you deallocate "test", do you need to deallocate "x" first, or is this done automatically in the deallocation of "test"?
0 Kudos
2 Replies
Steven_L_Intel1
Employee
1,901 Views
The nested allocatable components are automatically deallocated.
0 Kudos
bbeyer
Novice
1,901 Views
Thanks Steve!
0 Kudos
Reply