[mapguide-trac] #1039: Possible leak in selection

MapGuide Open Source trac_mapguide at osgeo.org
Tue Jul 21 14:59:08 EDT 2009


#1039: Possible leak in selection
---------------------+------------------------------------------------------
 Reporter:  jng      |         Owner:       
     Type:  defect   |        Status:  new  
 Priority:  low      |     Milestone:       
Component:  General  |       Version:  2.0.2
 Severity:  trivial  |    Resolution:       
 Keywords:           |   External_id:       
---------------------+------------------------------------------------------
Comment (by brucedechant):

 The MgSpatialContextReader object doesn't need to call Close() because the
 destructor of the MgSpatialContextReader class automatically calls
 Close(). When the GetFeatureExtents() method finishes the
 MgSpatialContextReader object will go out of scope because it is a smart
 pointer and the destructor will automatically be called.

 The preferred programming practice is to call Close() on any reader when
 finished, but in this particular case there is no harm in not calling it.
 Regardless I will update the code to conform to the proper use of readers.

 There may still be a leak in the selection code, but not calling Close()
 is not the source of it.

-- 
Ticket URL: <https://trac.osgeo.org/mapguide/ticket/1039#comment:3>
MapGuide Open Source <http://mapguide.osgeo.org/>
MapGuide Open Source Internals


More information about the mapguide-trac mailing list