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

Jason Beverage jbeverage at prologic-inc.com
Mon May 7 08:42:36 EDT 2007


Hi Tamas,

I tested out your fix and it seems to work just fine, no more memory
leak!

Thanks for the extremely quick turnaround on this.

Jason

-----Original Message-----
From: Tamas Szekeres [mailto:szekerest at gmail.com] 
Sent: Friday, May 04, 2007 6:02 P
To: Jason Beverage
Cc: gdal-dev at lists.maptools.org
Subject: Re: [Gdal-dev] Memory Leak with SpatialReference class in C#
bindings

Jason,

I've applied the fix for the memory leak problem in the SVN trunk and
branch 1.4. Would you mind making your test using the latest SVN
version?

Best regards,

Tamas



2007/5/4, Jason Beverage <jbeverage at prologic-inc.com>:
> 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