ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-4/src/utils/vector_class.F90
(Generate patch)

Comparing trunk/OOPSE-4/src/utils/vector_class.F90 (file contents):
Revision 2170 by chuckv, Tue Apr 12 17:39:06 2005 UTC vs.
Revision 2180 by gezelter, Tue Apr 12 21:28:07 2005 UTC

# Line 60 | Line 60
60   !! @author J. Daniel Gezelter
61   !! @author Charles F. Vardeman II
62   !! @author Matthew Meineke
63 < !! @version $Id: vector_class.F90,v 1.4 2005-04-12 17:39:06 chuckv Exp $, $Date: 2005-04-12 17:39:06 $, $Name: not supported by cvs2svn $, $Revision: 1.4 $
63 > !! @version $Id: vector_class.F90,v 1.6 2005-04-12 21:28:07 gezelter Exp $, $Date: 2005-04-12 21:28:07 $, $Name: not supported by cvs2svn $, $Revision: 1.6 $
64  
65   module Vector_class
66    
# Line 667 | Line 667 | contains
667         that => initialize(newCapacity, newPropCap, &
668              this%capacityIncrement, this%PropertyIncrement)      
669         call copyAllData(this, that)
670 <       deallocate(this)
670 >       this => destroy(this)
671         this => that
672      endif
673    end subroutine ensureCapacityHelper
# Line 883 | Line 883 | contains
883      logical :: done
884      type(Vector), pointer :: this
885      type(Vector), pointer :: null_this
886
887 !! Walk down the list and deallocate each of the vector components
888     if(associated(this%elementData)) then
889        deallocate(this%elementData)
890        this%elementData=>null()
891     endif
886  
887 <
888 <     if(associated(this%PropertyDescriptions)) then
889 <        deallocate(this%PropertyDescriptions)
890 <        this%PropertyDescriptions=>null()
887 >    if (.not. associated(this)) then
888 >       null_this => null()
889 >       return
890 >    end if
891 >    
892 > !! Walk down the list and deallocate each of the vector component
893 >     if(associated(this%logicalElementProperties)) then
894 >        deallocate(this%logicalElementProperties)
895 >        this%logicalElementProperties=>null()
896       endif
897 <    
898 <    
899 <    
901 <     if(associated(this%PropertyDataType)) then
902 <        deallocate(this%PropertyDataType)
903 <        this%PropertyDataType=>null()
897 >     if(associated(this%realElementProperties)) then
898 >        deallocate(this%realElementProperties)
899 >        this%realElementProperties=>null()
900       endif
905    
906    
901       if(associated(this%integerElementProperties)) then
902          deallocate(this%integerElementProperties)
903          this%integerElementProperties=>null()
904       endif
905 <    
906 <
907 <     if(associated(this%realElementProperties)) then
914 <        deallocate(this%realElementProperties)
915 <        this%realElementProperties=>null()
905 >     if(associated(this%PropertyDataType)) then
906 >        deallocate(this%PropertyDataType)
907 >        this%PropertyDataType=>null()
908       endif
909 <
910 <     if(associated(this%logicalElementProperties)) then
911 <        deallocate(this%logicalElementProperties)
920 <        this%logicalElementProperties=>null()
909 >     if(associated(this%PropertyDescriptions)) then
910 >        deallocate(this%PropertyDescriptions)
911 >        this%PropertyDescriptions=>null()
912       endif
913 +     if(associated(this%elementData)) then
914 +        deallocate(this%elementData)
915 +        this%elementData=>null()
916 +     endif
917       deallocate(this)
918 +     this => null()
919       null_this => null()
920    end function destroy
921    

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines