Re: [gdal-dev] Losing access to dataset variables. Am I doing something really dumb?

2014-08-12 Thread Even Rouault
Selon Jorge Arevalo : > Hi Even, > > Thanks for your hints. About the memory leaking, apart from the obvious > fact that CPLStrdup vars need to be freed, are you seeing something more? No, that was indeed what I meant. Not much more that could leak in the snippet ;-) > > > On Tue, Aug 12, 2014 a

Re: [gdal-dev] Losing access to dataset variables. Am I doing something really dumb?

2014-08-12 Thread Jorge Arevalo
Hi Even, Thanks for your hints. About the memory leaking, apart from the obvious fact that CPLStrdup vars need to be freed, are you seeing something more? On Tue, Aug 12, 2014 at 9:48 AM, Even Rouault wrote: > Hi Jorge, > > I don't see anything obviously wrong. Looking at the places where the

Re: [gdal-dev] Losing access to dataset variables. Am I doing something really dumb?

2014-08-12 Thread Even Rouault
Hi Jorge, I don't see anything obviously wrong. Looking at the places where the variables might be nullified and running Valgrind would be my best advice. Just wanted to mention that in the likely simplified below snippet, you would leak memory. Even > Hello, > > I have a stupid mistake in my co

[gdal-dev] Losing access to dataset variables. Am I doing something really dumb?

2014-08-11 Thread Jorge Arevalo
Hello, I have a stupid mistake in my code. This is the problem (very simplified): postgisrasterdataset.cpp PostGISRasterDataset::IRasterIO() { // Two attributes of my class, that inherits from GDALDataset pszAttribute = CPLStrdup("foo"); pszAttribute2 = CPLStrdup("bar"); //