[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Sv: Sv: Memory allocators



> >>(BTW - how do you handle out-of-memory situations?)
> >>
> >Well, doesn't new throw an exception if it fails? I'm not catching any
> >exceptions from new, so I handle out-of-memory exactly like new does.
>
> I wouldn't really on new throwing an exception  unless you have explicitly
> set the new handler to do this. I think that most implementations of new
> just
> return NULL if memory allocation failed. At least this is what happens
with
> visual c++.
>
Ah, ok. That's what the way its done in the allocators too now.