Boost logo

Boost :

From: Rob Stewart (stewart_at_[hidden])
Date: 2002-08-30 11:29:04


From: Daniel Frey <daniel.frey_at_[hidden]>
> Rob Stewart wrote:
> >
> > Given that your demangling logic will be invoked in almost every
> > use case strictly for error reporting, performance is not an
> > issue. Therefore, any performance concern wrt copying strings is
> > moot.
>
> It's not just about performance. Errors may occur when the system is
> short of memory, thus you should try be avoid memory allocations
> whenever possible (OK, string will most likely not be a real problem,
> put you never know...).

That certainly can occur. However, the only way to preclude that
problem is to preallocate memory.

-- 
Rob Stewart                           stewart_at_[hidden]
Software Engineer                     http://www.sig.com
Susquehanna International Group, LLP  using std::disclaimer;

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk