Changeset 0f7a0ea
- Timestamp:
- Dec 8, 2020, 6:40:10 PM (3 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 48f6252
- Parents:
- d6089ad
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/stdlib.hfa
rd6089ad r0f7a0ea 10 10 // Created On : Thu Jan 28 17:12:35 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : T hu Nov 12 20:58:48202013 // Update Count : 52 012 // Last Modified On : Tue Dec 8 18:27:22 2020 13 // Update Count : 524 14 14 // 15 15 … … 268 268 static inline forall( dtype T | { void ^?{}( T & ); } ) 269 269 void delete( T * ptr ) { 270 if ( ptr ) { // ignore null 270 // special case for 0-sized object => always call destructor 271 if ( ptr || sizeof(ptr) == 0 ) { // ignore null but not 0-sized objects 271 272 ^(*ptr){}; // run destructor 272 free( ptr );273 273 } // if 274 free( ptr ); 274 275 } // delete 275 276
Note: See TracChangeset
for help on using the changeset viewer.