How do I destroy an object created using CreateObject, so that I can ensure there is no Resource/Memory leak
For Eg
- Code: Select all Expand view
oConnection:=CreateObject("ADODB.Connection")
oRecSet:=CreateObject(""ADODB.RecordSet"")
In the above given eg. Which is the right way to kill/destroy the objects
- Code: Select all Expand view
oConnection:End()
oConnection:=NIL
oRecSet:End()
oRecSet:=NIL
I would like to know whether the oObject:End() followed by oObject:=NIL is the right method or not. Or is there any other way to do the same
Regards
Anser