8 # include <vcl_msvc_warnings.h> 14 static std::vector<vsl_binary_loader_base*> *loader_list_ =
nullptr;
20 static std::vector<clear_func_ptr> *extra_loader_clear_list_ =
nullptr;
39 if (loader_list_==
nullptr) loader_list_ =
new std::vector<vsl_binary_loader_base*>;
40 loader_list_->push_back(
this);
48 if (extra_loader_clear_list_ ==
nullptr)
49 extra_loader_clear_list_ =
new std::vector<clear_func_ptr>;
51 extra_loader_clear_list_->push_back(func);
61 if (loader_list_!=
nullptr)
63 const auto n = (
unsigned int)(loader_list_->size());
64 for (
unsigned i=0;i<n;++i)
65 delete loader_list_->operator[](i);
66 loader_list_->clear();
void register_this()
Register this, so it can be deleted by vsl_delete_all_loaders();.
void vsl_register_new_loader_clear_func(clear_func_ptr func)
Allows other loader scheme to piggy back on the clearing of vsl loaders.
void vsl_indent_clear_all_data()
Tidy up the internal indent map to remove potential memory leaks.
void vsl_delete_all_loaders()
Deletes all the loaders.
~vsl_binary_loader_base_auto_clearup()