[Gdal-dev] NG Python bindings, and SWIG 1.3.29

Christopher Barker Chris.Barker at noaa.gov
Thu May 25 13:06:16 EDT 2006


> Frank Warmerdam wrote:
>> invoking Destroy() or Release() on an
>> ogr.DataSource is *not* causing it to be closed immediately and this is
>> causing serious problems for tests that require this.

Is it closing later?

>> Currently this just seems to decrement the
>>    Python reference count leaving it up to the Python VM to invoke the
>>    close function when it pleases.

Just to help clarify: In C-Python, the object is deleted right away when 
the reference count goes to zero. That's not guaranteed by the language 
spec, but is is how the current interpreter works, and a lot of people 
do count on it.

So you probably have an extra reference to the object in there, or 
perhaps there's a bug in SWIG.

-Chris



-- 
Christopher Barker, Ph.D.
Oceanographer
                                     		
NOAA/OR&R/HAZMAT         (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker at noaa.gov



More information about the Gdal-dev mailing list