[fdo-users] RE: .net Wrapper quirks
jumpinjackie at gmail.com
Sat Jul 24 03:29:21 EDT 2010
Perhaps you're doubly disposing some objects? Putting the object in a using
statement will auto-call the Dispose() method at the end.
This is just general advice, but where possible I try to avoid excessively
"using" the FDO API where possible, if you can represent the state of any
object from the FDO API with a fully managed counterpart, you reduce the
ability for access violations to throw a monkey wrench.
Take for example reading features from an IFeatureReader.
What you normally do is call the GetClassDefinition(), so you then know what
properties are in the feature reader.
Now what I find is that for some really large datasets (> 100k features), I
get access violations thrown at me because I've been repeatedly hitting this
cached class definition everytime I read a feature.
So instead I cache the property name and type of each property in that class
definition in a .net dictionary class (fully managed), and query that
instead of the cached class definition everytime I read a feature. I found
greater stability with this approach. Maybe it can work for you too.
View this message in context: http://osgeo-org.1803224.n2.nabble.com/net-Wrapper-quirks-tp2049912p5332298.html
Sent from the FDO Users mailing list archive at Nabble.com.
More information about the fdo-users