[fdo-trac] #356: .NET: IFeatureReader throws errors when passed by
value
FDO
trac_fdo at osgeo.org
Mon Jul 14 08:06:24 EDT 2008
#356: .NET: IFeatureReader throws errors when passed by value
-----------------------+----------------------------------------------------
Reporter: MaksimS | Owner: gregboone
Type: defect | Status: new
Priority: major | Milestone:
Component: FDO API | Version: 3.3.1
Severity: 3 | Keywords:
External_id: |
-----------------------+----------------------------------------------------
.NET 2.0: When passed by value, instantiated
OSGeo.FDO.Commands.Feature.IFeatureReader causes "memory read error"
exceptions thrown on random basis. It's possibly something up to generated
managed SWIG interfaces and ways the unmanaged objects / related memory
gets handled.
Example:
There's MyFeature class that takes instantiated IFeatureReader in it's
constructor to populate it's members and instantiate MyFeature object:
{{{
Public Class MyFeature
Sub New(ByVal reader As OSGeo.FDO.Commands.Feature.IFeatureReader)
...
...
End Sub
...
}}}
While being utilized like:
{{{
...
Dim reader As IFeatureReader = selectCmd.Execute
Do While reader.ReadNext
Dim myFeatureInstance As New MyFeature(reader)
...
Loop
reader.Close()
reader.Dispose()
...
}}}
Excatly the same exceptions (again, on random basis) get thrown if
instantiated IFeatureReader was passed by reference. Can someone please
point out "dos and dont's" of managed FDO API interfaces?
--
Ticket URL: <http://trac.osgeo.org/fdo/ticket/356>
FDO <http://fdo.osgeo.org/>
Feature Data Objects
More information about the fdo-trac
mailing list