--- deliantra/server/include/util.h 2008/04/20 06:20:38 1.71 +++ deliantra/server/include/util.h 2008/04/30 16:26:28 1.72 @@ -226,6 +226,14 @@ } } +// nulls the pointer +template +inline void sfree0 (T *&ptr, int n = 1) throw () +{ + sfree (ptr, n); + ptr = 0; +} + // makes dynamically allocated objects zero-initialised struct zero_initialised {