(j3.2006) finalizing undefined entities

John Reid j.k.reid
Tue Mar 18 16:00:57 EDT 2008



Michael Ingrassia wrote:

>>I would expect to 
>>see statements that begin IF (ALLOCATED( ... or IF (ASSOCIATED ( pretty 
>>often in a robust final routine.
> 
> 
> But  ASSOCIATED(X) has no semantics if the pointer association status
> of X is undefined, right?  So it can't be used for this purpose.
> 
> I agree that ALLOCATED( ... can, but does that mean that programmers
> are limited to finalizing  
> allocatable entities if they want robust finalizers?


How about

         DEALLOCATE (pointer, stat=istat)

This would need to be done separately for each pointer; otherwise, there is no 
certainty that each valid target is deallocated.

Cheers,

John.



More information about the J3 mailing list