L
Lee
Hi there,
Not sure if this is the most relevent newsgroup so please redirect me if
needed.
I just have a general query regarding how memory disposal works in relation
to the DOM object model. Take a look at the pseudo code below.
Dim odom as domdocument
dim onode as node
dim onodeclone as node
dim onodes as nodelist
odom = createobject
onode = selectsinglenode("/blah")
onodes = selectnodes("//blah")
onodeclone = onode.clone
Now, its a given that the odom object needs to be set to nothing but what
else does, if anything? My understanding is the following: -
The onode object will just hold a memory reference to somewhere in the odom
memory space.
onodes will store an array/arraylist of these memory references
onodeclone will have its own memory and contain a replica of the data stored
in the memory location referenced by onode.
So saying that, which of the above would I have to dispose of too? Are
onode and onodes taken care of when you dispose of the odom object? I am
guessing you would have to dispose of onodeclone since it has its own memory?
Maybe there is a web resource which explains this in detail?
Thanks in advance.
Not sure if this is the most relevent newsgroup so please redirect me if
needed.
I just have a general query regarding how memory disposal works in relation
to the DOM object model. Take a look at the pseudo code below.
Dim odom as domdocument
dim onode as node
dim onodeclone as node
dim onodes as nodelist
odom = createobject
onode = selectsinglenode("/blah")
onodes = selectnodes("//blah")
onodeclone = onode.clone
Now, its a given that the odom object needs to be set to nothing but what
else does, if anything? My understanding is the following: -
The onode object will just hold a memory reference to somewhere in the odom
memory space.
onodes will store an array/arraylist of these memory references
onodeclone will have its own memory and contain a replica of the data stored
in the memory location referenced by onode.
So saying that, which of the above would I have to dispose of too? Are
onode and onodes taken care of when you dispose of the odom object? I am
guessing you would have to dispose of onodeclone since it has its own memory?
Maybe there is a web resource which explains this in detail?
Thanks in advance.