Changes in libcfa/src/virtual_dtor.hfa [8512a2f:1e940de0]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/virtual_dtor.hfa
r8512a2f r1e940de0 25 25 __virtual_obj_start = &this; 26 26 } 27 static inline void __CFA_dtor_shutdown( virtual_dtor & this ) with(this) { 27 static inline bool __CFA_dtor_shutdown( virtual_dtor & this ) with(this) { 28 if ( __virtual_dtor_ptr == 1p ) return true; // stop base dtors from being called twice 28 29 if ( __virtual_dtor_ptr ) { 29 30 void (*dtor_ptr)(virtual_dtor &) = __virtual_dtor_ptr; 30 31 __virtual_dtor_ptr = 0p; 31 dtor_ptr(*((virtual_dtor *)__virtual_obj_start)); // replace actor with base type 32 return; 32 dtor_ptr(*((virtual_dtor *)__virtual_obj_start)); // call most derived dtor 33 __virtual_dtor_ptr = 1p; // stop base dtors from being called twice 34 return true; 33 35 } 36 return false; 34 37 } 35 38 static inline void __CFA_virt_free( virtual_dtor & this ) { free( this.__virtual_obj_start ); }
Note: See TracChangeset
for help on using the changeset viewer.