[fdo-trac] #65: GDAL: Connection RefCount incremented for
internal worker objects
FDO
trac_fdo at osgeo.org
Wed Apr 25 16:56:34 EDT 2007
#65: GDAL: Connection RefCount incremented for internal worker objects
------------------------------+---------------------------------------------
Reporter: gregboone | Owner: gregboone
Type: defect | Status: assigned
Priority: major | Milestone: 3.2.2
Component: GDAL Provider | Version: 3.2.2
Severity: 1 | Resolution:
Keywords: refcount, addref | External_id:
------------------------------+---------------------------------------------
Old description:
> When the GDAL provider connection is created and Open() is called, the
> resulting !RefCount should be 1. With the GDAL provider the !RefCount is
> incremented to 3. These additional increments are caused during the Open
> process as the connection object is passed, via method parameters, to
> several internal worker objects (including !FdoRfpClassData and
> !FdoRfpGeoBandRaster) who in turn call !AddRef on the connection. When
> dealing with internal worker objects, whoose lifespan is guaranteed to be
> the lifespan to the connection, these types of object should only hold
> soft references to the connection object so that a circular dependency
> does not occur. The solution to this issue is to not !AddRef the
> connection when storing the connection pointer as class data.
New description:
When the GDAL provider connection is created and Open() is called, the
resulting !RefCount should be 1. With the GDAL provider the !RefCount is
incremented to 3. These additional increments are caused during the Open
process as the connection object is passed, via method parameters, to
several internal worker objects (including !FdoRfpClassData and
!FdoRfpGeoBandRaster) who in turn call !AddRef on the connection. When
dealing with internal worker objects, whose lifespan is guaranteed to be
the lifespan to the connection, these types of object should only hold
soft references to the connection object so that a circular dependency
does not occur. The solution to this issue is to not !AddRef the
connection when storing the connection pointer as class data.
--
Ticket URL: <http://trac.osgeo.org/fdo/ticket/65#comment:5>
FDO <http://fdo.osgeo.org/>
Feature Data Objects
More information about the fdo-trac
mailing list