Opened 15 years ago
Closed 15 years ago
#1039 closed defect (invalid)
Possible leak in selection
Reported by: | jng | Owned by: | |
---|---|---|---|
Priority: | low | Milestone: | |
Component: | General | Version: | 2.0.2 |
Severity: | trivial | Keywords: | |
Cc: | tomfukushima, brucedechant | External ID: |
Description
In the file:
MgDev/Common/PlatformBase/MapLayer/SelectionBase.cpp
at the method: MgSelectionBase::GetFeatureExtents(...)
the spatial context reader is not being closed after being used.
Change History (5)
follow-up: 4 comment:1 by , 15 years ago
Cc: | added |
---|
comment:3 by , 15 years ago
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.
comment:4 by , 15 years ago
That's what I initially thought, I just walked through the code from the starting point of MgSelectionBase::GetExtents (from that code fragment) and found what I thought was a spatial context reader not being closed.
Now that this is not the case (thanks Bruce for the clarification), I'll guess we'll just keep on hunting for the cause of this connection exhaustion problem.
Replying to jbirch:
Jackie, is this a possible cause of the problem mentioned here?
It's a bit disturbing that connections are being held open; this will stop the server from shutting down in an orderly fashion for repository backups, etc...
comment:5 by , 15 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
Jackie, is this a possible cause of the problem mentioned here?
http://n2.nabble.com/FW%3A--mapguide-users--MapGuide-runs-out-of-FDO-connections-under-Fusion-MGOS-2.1-Beta-tp3287689p3287689.html
It's a bit disturbing that connections are being held open; this will stop the server from shutting down in an orderly fashion for repository backups, etc...