I have inherited an app that has 25 classes in 6 dlls.
I have a memory leak that appears after several days.
I know that I have to set my objects to nothing.
My questions are. . .
How do I determine what to set to nothing?
adodb.connection
adodb.command
adodb.recordset
MSXML2.DOMDocument
what else. . .
----------------------------
How do I clean something like this up?
public function getLeaf() as LeafObject
dim myTree as new TreeObject
dim myBranch as object
set myBranch = myTree.GetBranch(0)
dim myTwig as object
set myTwig = myBranch.GetTwig(55)
dim myLeaf as LeafObject
set myLeaf = myTwig.GetLeaf(99)
return myLeaf
EndFunction
I have a memory leak that appears after several days.
I know that I have to set my objects to nothing.
My questions are. . .
How do I determine what to set to nothing?
adodb.connection
adodb.command
adodb.recordset
MSXML2.DOMDocument
what else. . .
----------------------------
How do I clean something like this up?
public function getLeaf() as LeafObject
dim myTree as new TreeObject
dim myBranch as object
set myBranch = myTree.GetBranch(0)
dim myTwig as object
set myTwig = myBranch.GetTwig(55)
dim myLeaf as LeafObject
set myLeaf = myTwig.GetLeaf(99)
return myLeaf
EndFunction