By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,504 Members | 1,884 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,504 IT Pros & Developers. It's quick & easy.

Memory leak

P: n/a
The following code of mine is leaking memory. I am suspecting the
OraCollection and OraObject objects as the cause. Can somebody offer
any suggestions, advice or recommendations? Thanks in advance.

Dim ocolCoordinates As OraCollection
Dim oobjTracks As OraObject
Dim refCount As Integer
Dim startDateTime As DateTime
Dim trackPoint As TPoint
:
:

startDateTime = DateTime.Parse(oraDynaset.Fields("START_TIME").Val ue)
oobjTracks = oraDynaset.Fields("TRACKPOINTS").Value
ocolCoordinates = oobjTracks.SDO_Ordinates
For i = 1 To ocolCoordinates.size Step 4
trackPoint = New TrackPoint _
(Double.Parse(ocolCoordinates(i + 1)) _
, Double.Parse(ocolCoordinates(i)) _
, Short.Parse(ocolCoordinates(i + 2)) _
,
startDateTime.AddSeconds(Double.Parse(ocolCoordina tes(i + 3))) _
)
F.AddPoint(trackPoint)
Next
refCount = Marshal.ReleaseComObject(ocolCoordinates)
'Debug.Assert(0 = refCount, "ocolCoordinates object still has " &
refCount.ToString() & " references.")
ocolCoordinates = Nothing
refCount = Marshal.ReleaseComObject(oobjTracks)
'Debug.Assert(0 = refCount, "oobjTracks object still has " &
refCount.ToString() & " references.")
oobjTracks = Nothing
Jul 19 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.