Re: [gdal-dev] Problem closing VRT GDALDataset *

2009-07-21 Thread Even Rouault
Le Tuesday 21 July 2009 22:50:10 Adeel Raza, vous avez écrit : > Hi Frank, > > OK - my next question then is: If I close the VRT dataset if it > references the MEM dataset using GDALClose(), would that operation also > close the MEM dataset It depends if you drop the reference on the MEM dataset b

Re: [gdal-dev] Problem closing VRT GDALDataset *

2009-07-21 Thread Adeel Raza
Hi Frank, OK - my next question then is: If I close the VRT dataset if it references the MEM dataset using GDALClose(), would that operation also close the MEM dataset or would I need to close the MEM dataset after I close the VRT dataset? Best Regards, Adeel. Frank Warmerdam wrote: Adeel

Re: [gdal-dev] Problem closing VRT GDALDataset *

2009-07-21 Thread Frank Warmerdam
Adeel Raza wrote: Hi Frank, Thanks for the help. It seems like you were correct. When I dereference the MEM dataset the post-decrement reference count is not 0. My question is: do I not close the MEM dataset since its reference count is not 0? Adeel, You should not be closing the MEM datase

Re: [gdal-dev] Problem closing VRT GDALDataset *

2009-07-21 Thread Adeel Raza
Hi Frank, Thanks for the help. It seems like you were correct. When I dereference the MEM dataset the post-decrement reference count is not 0. My question is: do I not close the MEM dataset since its reference count is not 0? Best Regards, Adeel Raza. Frank Warmerdam wrote: Adeel Raza wrote

Re: [gdal-dev] Problem closing VRT GDALDataset *

2009-07-21 Thread Frank Warmerdam
Adeel Raza wrote: Hi, I 'm using the GDALAutoCreateWarpedVRT() function to warp a MEM GDALDataset. When I use the GDALClose() function to close the source (MEM) dataset nothing happens. However, when I close the warped (VRT) dataset using GDALClose() I get the following error: "Unhandled exce

[gdal-dev] Problem closing VRT GDALDataset *

2009-07-21 Thread Adeel Raza
Hi, I 'm using the GDALAutoCreateWarpedVRT() function to warp a MEM GDALDataset. When I use the GDALClose() function to close the source (MEM) dataset nothing happens. However, when I close the warped (VRT) dataset using GDALClose() I get the following error: "Unhandled exception at 0x01226b6e