Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.oracle -> Memory leak

Memory leak

From: eSapient <eSapient_at_Yahoo.com>
Date: 25 Feb 2004 14:36:09 -0800
Message-ID: <3c218a52.0402251436.28b5529e@posting.google.com>

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").Value)
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(ocolCoordinates(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 Received on Wed Feb 25 2004 - 16:36:09 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US