[fdo-trac] #63: Sanity check for RefCount

FDO trac_fdo at osgeo.org
Tue Apr 24 12:57:53 EDT 2007


#63: Sanity check for RefCount
---------------------------+------------------------------------------------
   Reporter:  gavincramer  |       Owner:  gavincramer
       Type:  task         |      Status:  new        
   Priority:  major        |   Milestone:  3.3.0      
  Component:  FDO API      |     Version:  3.3.0      
   Severity:  3            |    Keywords:             
External_id:               |  
---------------------------+------------------------------------------------
 For FDO objects that support reference-counting, there are no checks to
 make sure that the reference counts are valid.  Such checks could catch
 the use of stale pointers before they can (significantly) corrupt the
 heap.  Throwing an exception about memory management is a better outcome
 than allowing execution to proceed to a crash.  This also makes debugging
 memory issues much easier.  It won't catch all memory mismanagement, but a
 non-positive reference count is a fairly obvious condition to check.

 Checks for non-positive reference counts should be added (at least in
 Debug mode) to several choice locations:
  - FdoIDisposable::Release
  - FdoArray::Release
  - FdoCollection::GetItem

-- 
Ticket URL: <http://trac.osgeo.org/fdo/ticket/63>
FDO <http://fdo.osgeo.org/>
Feature Data Objects


More information about the fdo-trac mailing list