From: Geoffrey B. <g....@au...> - 2006-06-18 19:37:34
|
I vote for option 2. Leaks are bad, even small ones, and it's a small, one--time change to the API. Geoff Toby Collett wrote: > Hi, > I think the time has come to decide what we are going to do about the > minor memory leak when clients disconnect (i.e. we are unable to free > their queue as messages throughout various drivers may still point to it). > > The way I see it we have a couple of options... > 1) Ignore it, its not really an issue, its a small leak and only when a > client disconnects... > 2) Apply the autopointer patch I made a while back, this fixes the issue > but changes the function signature of ProcessMessage and some Publish > calls. These are trivial to update but affect every driver ever written. > 3) come up with some other sort of reference counting for the client > queue itself and check the list of > closed queue every so often till we are sure they are free and then > delete them. This is a bit painful, and I'm not even sure its 100% > possible until someone actually tries to implement it > 4) Something I haven't thought of > > Personally Im in favour of option 2, just because I dont like the idea > of a leak and if we are going to break the API there is no time like the > present. 2.0.x will still remain safe and we can provide an automatic > script for the 2.0 to 2.1 update (not that it is written yet...) > > However I understand if people prefer option 1, I just think we should > decide this one once and for all. > > Toby -- Robotics research group, University of Auckland http://www.ece.auckland.ac.nz/~gbig005/ |