Ignore:
Timestamp:
Dec 9, 2020, 3:01:32 PM (2 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
arm-eh, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
a1850ac
Parents:
2a59655 (diff), 364a03c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/stdlib.hfa

    r2a59655 r1a2a49b  
    1010// Created On       : Thu Jan 28 17:12:35 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Nov 12 20:58:48 2020
    13 // Update Count     : 520
     12// Last Modified On : Tue Dec  8 18:27:22 2020
     13// Update Count     : 524
    1414//
    1515
     
    268268static inline forall( dtype T | { void ^?{}( T & ); } )
    269269void 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
    271272                ^(*ptr){};                                                                              // run destructor
    272                 free( ptr );
    273273        } // if
     274        free( ptr );
    274275} // delete
    275276
Note: See TracChangeset for help on using the changeset viewer.