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

Jason Beverage jbeverage at prologic-inc.com
Fri May 4 10:48:53 EDT 2007


Sorry for the bad form of replying to my own message, but would it also
be possible to expose the array based coordinate transformation methods
that convert many locations with a single method call?

Thanks!

Jason


-----Original Message-----
From: gdal-dev-bounces at lists.maptools.org
[mailto:gdal-dev-bounces at lists.maptools.org] On Behalf Of Jason Beverage
Sent: Friday, May 04, 2007 9:51 A
To: gdal-dev at lists.maptools.org
Subject: [Gdal-dev] Memory Leak with SpatialReference class in C#
bindings

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

_______________________________________________
Gdal-dev mailing list
Gdal-dev at lists.maptools.org
http://lists.maptools.org/mailman/listinfo/gdal-dev




More information about the Gdal-dev mailing list