File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,10 +14,14 @@ class template_repo_base {
1414 template_repo_base (mfast::allocator *dictionary_alloc)
1515 : dictionary_alloc_(dictionary_alloc) {}
1616 virtual ~template_repo_base () {
17- for (auto &elem : vector_enties_ ) {
17+ for (auto &elem : vector_entries_ ) {
1818 if (elem->of_array .capacity_in_bytes_ )
19+ {
1920 dictionary_alloc_->deallocate (elem->of_array .content_ ,
2021 elem->of_array .capacity_in_bytes_ );
22+ elem->of_array .capacity_in_bytes_ = 0 ;
23+ elem->of_array .content_ = nullptr ;
24+ }
2125 }
2226 }
2327
@@ -35,15 +39,15 @@ class template_repo_base {
3539 }
3640 void add_vector_entry (value_storage *entry) {
3741 if (dictionary_alloc_)
38- vector_enties_ .push_back (entry);
42+ vector_entries_ .push_back (entry);
3943 }
4044
4145protected:
4246 friend class dictionary_builder ;
4347
4448 typedef std::vector<value_storage *> value_entries_t ;
4549 value_entries_t reset_entries_;
46- value_entries_t vector_enties_ ; // for string and byteVector
50+ value_entries_t vector_entries_ ; // for string and byteVector
4751 arena_allocator instruction_alloc_;
4852 mfast::allocator *dictionary_alloc_;
4953};
You can’t perform that action at this time.
0 commit comments