--- deliantra/server/include/util.h 2006/12/17 23:10:35 1.20 +++ deliantra/server/include/util.h 2006/12/21 06:12:36 1.21 @@ -56,6 +56,10 @@ template inline T *salloc (int n, T *src) throw (std::bad_alloc) { return (T *)salloc_ (n * sizeof (T), (void *)src); } +// clears the memory +template +inline T *salloc0(int n = 1) throw (std::bad_alloc) { return (T *)salloc_ (n * sizeof (T), 0); } + // for symmetry template inline void sfree (T *ptr, int n = 1) throw ()