Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Memory Deallocation

bbeyer
新手
1,834 次查看
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 项奖励
2 回复数
Steven_L_Intel1
1,834 次查看
The nested allocatable components are automatically deallocated.
0 项奖励
bbeyer
新手
1,834 次查看
Thanks Steve!
0 项奖励
回复