On Sun, Nov 03, 2013 at 07:38:48AM -0800, Daniel Murphy wrote:
> > @@ -593,6 +593,15 @@ const char *FileName::replaceName(const char *path, const char *name)
> >   * Free returned value with FileName::free()
> >   */
> >  
> > +const char *FileName::dup(const char *name)
> 
> This function is pretty much useless.  Just use `mem.strdup` directly.

Yeah, I had my doubts about that, but all functions allocating memory
say "Use FileName::free()", and technically there are no guarantees that
that free() uses mem.free(), so I preferred to keep the API in terms of
memory allocations clean. I know probably DMD only uses mem.malloc/free
to allocate/free and it wouldn't change a but wrapping it or not, but
still having that kind of asymmetric API makes noise in my brain. I
would prefer to simply remove FileName::free() and change the comments
asking for users of the API to use mem.free() directly (is only there to
implement some primitive stomping mechanism, which doesn't make all that
sense now that valgrind exists).

What do you think?