ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/include/util.h
(Generate patch)

Comparing deliantra/server/include/util.h (file contents):
Revision 1.71 by root, Sun Apr 20 06:20:38 2008 UTC vs.
Revision 1.72 by root, Wed Apr 30 16:26:28 2008 UTC

224 g_slice_free1 (n * sizeof (T), (void *)ptr); 224 g_slice_free1 (n * sizeof (T), (void *)ptr);
225 assert (slice_alloc >= 0);//D 225 assert (slice_alloc >= 0);//D
226 } 226 }
227} 227}
228 228
229// nulls the pointer
230template<typename T>
231inline void sfree0 (T *&ptr, int n = 1) throw ()
232{
233 sfree<T> (ptr, n);
234 ptr = 0;
235}
236
229// makes dynamically allocated objects zero-initialised 237// makes dynamically allocated objects zero-initialised
230struct zero_initialised 238struct zero_initialised
231{ 239{
232 void *operator new (size_t s, void *p) 240 void *operator new (size_t s, void *p)
233 { 241 {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines