[Gdal-dev] Memory Leak with SpatialReference class in C# bindings

Jason Beverage jbeverage at prologic-inc.com
Fri May 4 09:51:23 EDT 2007


All,

I've been looking at the C# bindings to see if we can use them in our
project and I noticed that there seems to be a memory leak when using
the SpatialReference class.  I'm not sure this same problem exists
elsewhere, but it is something to look into.

Running the following simple loop makes memory go through the roof even
though Dispose is being called 
for (int i = 0; i < 1000000; ++i)
{
  using (SpatialReference dst = new SpatialReference(""))
  {
    //Do something with SpatialReference
  }
}

I looked through the bindings quickly this morning and didn't see
anything glaringly obvious, should I file a ticket for this problem?

Thanks!

Jason




More information about the Gdal-dev mailing list