src/cx/allocator.h

changeset 526
b070ef465313
parent 508
8aea65ae1eaf
child 528
4fbfac557df8
equal deleted inserted replaced
525:536646d1575b 526:b070ef465313
106 106
107 /** 107 /**
108 * Function pointer type for destructor functions. 108 * Function pointer type for destructor functions.
109 * 109 *
110 * A destructor function deallocates possible contents and MAY free the memory 110 * A destructor function deallocates possible contents and MAY free the memory
111 * pointed to by \p memory. 111 * pointed to by \p memory. Read the documentation of the respective function
112 * pointer to learn if a destructor SHALL, MAY, or MUST NOT free the memory in that
113 * particular implementation.
112 * 114 *
113 * @param memory a pointer to the object to destruct 115 * @param memory a pointer to the object to destruct
114 * @return \p memory if it has NOT been free'd by this destructor, otherwise \c NULL
115 */ 116 */
116 typedef void *(*cx_destructor_func)(void *memory) 117 typedef void (*cx_destructor_func)(void *memory) __attribute__((__nonnull__));
117 __attribute__((__nonnull__, __warn_unused_result__));
118 118
119 /** 119 /**
120 * Allocate \p n bytes of memory. 120 * Allocate \p n bytes of memory.
121 * 121 *
122 * @param allocator the allocator 122 * @param allocator the allocator

mercurial