[gdal-dev] C# OGR and memoryproblems.
Tamas Szekeres
szekerest at gmail.com
Mon Oct 13 10:58:27 EDT 2008
2008/10/13 Hallgren, Johan <johan.hallgren at logica.com>:
> Let's see here. What are you meaning with "open-shared option" you're mention?
>
Creating the Dataset by using Gdal.OpenShared() for example.
> We tried to use Dispose() on datasource but the program crashed immediately. Then we used feature.Dispose() but that one didn't solve the problem, the program still crash at the second round (second call from outside).
>
> We managed to solve the problem by turning the Web Service into an EXE. To start with the problem also appeared in the EXE but we changed three things in the code that seemed solve the problem in the exe.
>
> The first thing we added was a call to Dispose() on a feature that was used in a while-loop.
>
> The second thing we added was a call to the Drivers DeleteDataSource().
>
> The third thing was to encapsulate the code in a using-statement.
>
> The error went away in the EXE. But when we tried the code in the Web Service and it seems as we still got the same memory problem at the second round there.
>
Could you create a simple example so as to reproduce this behaviour?
Best regards,
Tamas
More information about the gdal-dev
mailing list