On Thu, 20 Feb 2003, Alexander Terekhov wrote:

> Kevin Atkinson wrote:
> > 
> > On Thu, 20 Feb 2003, Alexander Terekhov wrote:
> > 
> > > > I have changed the definition to:
> > > >
> > > > #ifdef FAST_MUTEX_INIT_DESTROY
> > >                          ^^^^^^^
> > >
> > > >   static const pthread_mutex_t MUTEX_INIT = PTHREAD_MUTEX_INITIALIZER;
> > >
> > > Uhmm. What does your "fast destruction" do? Well, looking at the code
> > > you've posted, it does nothing... and that's the "fastest" way to leak.
> > 
> > It depends on the implementation.  On some, including linux, there is
> > nothing to free.  
> 
> But that might change overnight [on the next start, I mean]... and even 
> without any recompiles (rebuilds) on the part of your clients, Kevin.

I said to drop it.  I don't care.  I have it #ifdef I will leave it that
way.  By default I don't have the FAST_MUTEX_INIT_DESTROY defined.  So it
is not doing any harm.  If others comment on it I may eventually remove
it.  It will not change on a next start unless someone upgrades there
library.  The glibc document specifically says that
pthread_mutex_destroy does nothing.  When it does something I am sure it 
will be mentioned in the "Significant Changes" section.

Do you *ever* assume anything that is not specifically spelled out to the 
letter in the standard?  For example do you believe that 
  vector<char> c; &*c.begin() 
is not well defined, even though ever one assume it is.  Or that it is not 
safe to assume the layout of
struct A {
  int x;
  int y;
  A() x(0), y(0) {}
};
because it is not a POD due to the constructor.


-- 
http://kevin.atkinson.dhs.org

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to