Showing the changes to src/vm/list.cpp (1 of 4 files). Show all
Unified · Split
| @@ -45,10 +45,6 @@ vm_list_t::vm_list_t(std::shared_ptr<const type_descriptor_t> td, vm_list_t *tai · 44 unmodified lines | ||
| 45 | 45 | |
| 46 | 46 | vm_list_t::~vm_list_t() |
| 47 | 47 | { |
| 48 | − // Remove tail | |
| 49 | − dec_ref_count_and_free(_tail); | |
| 50 | − debug::assign_debug_pointer(&_tail); | |
| 51 | − | |
| 52 | 48 | // Destroy and free the list element, if default element size was surpassed. |
| 53 | 49 | if (_is_alloc) |
| 54 | 50 | { |
| @@ -61,7 +57,13 @@ vm_list_t::~vm_list_t() · 6 unmodified lines | ||
| 61 | 57 | } |
| 62 | 58 | |
| 63 | 59 | debug::assign_debug_pointer(&_mem.alloc); |
| 64 | − disvm::debug::log_msg(component_trace_t::memory, log_level_t::debug, "destroy: vm list"); | |
| 60 | + | |
| 61 | + // Remove tail | |
| 62 | + dec_ref_count_and_free(_tail); | |
| 63 | + debug::assign_debug_pointer(&_tail); | |
| 64 | + | |
| 65 | + if (disvm::debug::is_component_tracing_enabled<component_trace_t::memory>()) | |
| 66 | + disvm::debug::log_msg(component_trace_t::memory, log_level_t::debug, "destroy: vm list"); | |
| 65 | 67 | } |
| 66 | 68 | |
| 67 | 69 | std::shared_ptr<const type_descriptor_t> vm_list_t::get_element_type() const |