-
New Garbage Collection??
When I upgraded my VB6 code to VB.NET I got this error.
'UPGRADE_NOTE: Object FSO may not be destroyed until it is garbage collected. Click for more: 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="vbup1029"'
FSO = Nothing
'UPGRADE_NOTE: Object FileName may not be destroyed until it is garbage collected. Click for more: 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="vbup1029"'
FileName = Nothing
'UPGRADE_NOTE: Object TS may not be destroyed until it is garbage collected. Click for more: 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="vbup1029"'
TS = Nothing
How do I make sure that i am destroying these objects or what is the correct way to do this in VB.NET. Thanks in advance.
-
FSO = FileSystemObject?
If it is, its probably
Phreak
-
Thanks
Here is how I declared the variables.
Public FSO As Scripting.FileSystemObject
Public FileName As Scripting.File
Public TS As Scripting.TextStream
So I can reclaim the memory by putting
FSO.Destroy()
FileName.Destroy()
TS.Destroy()
???
Thanks.