I have a conceptual doubt about defining and deleting structured data with complex fields inside
If I define an array of structured data with arrays and maps and list inside, and then I delete that element, are all the elements inside of that structure deleted as well ? or I need to delete them one by one before I delete the main structure?
Here is a code to show my doubt:
Code: Select all
Structure fieldStucture
field1.i
field2.i
EndStructure
Structure sampleStructure
ID.i
Array arrayField.i(0)
List listField.i()
Map MapField.i()
List strListField.fieldStucture()
EndStructure
Global NewList strucList.sampleStructure()
For n = 0 To 10
AddElement( strucList() )
strucList()\ID = n
ReDim strucList()\arrayField(10)
AddElement( strucList()\listField() )
AddMapElement( strucList()\MapField(), "1" )
AddElement( strucList()\strListField() )
strucList()\strListField()\field1 = n
strucList()\strListField()\field2 = n+1
Next
SelectElement( strucList(), 4 )
DeleteElement(strucList())
;Are all the elements of arrayField, listField, MapField, and strListField deleted too?