vsl_binary_loader_base.h
Go to the documentation of this file.
1 // This is core/vsl/vsl_binary_loader_base.h
2 #ifndef vsl_binary_loader_base_h_
3 #define vsl_binary_loader_base_h_
4 //:
5 // \file
6 
7 //: Base class for vsl_binary_loader objects
8 // Available to keep a record of all the loaders, so that they
9 // can be deleted to avoid memory leaks.
10 // See also vsl_delete_all_loaders().
12 {
13  public:
14  //: Dflt ctor
15  vsl_binary_loader_base() = default;
16 
17  //: Destructor
18  virtual ~vsl_binary_loader_base() = default;
19 
20  protected:
21  //: Register this, so it can be deleted by vsl_delete_all_loaders();
22  void register_this();
23 };
24 
25 
26 //: Deletes all the loaders derived from this class
27 // Deletes every loader for which register_this() has been called
28 // This function is automatically called on program exit to ensure
29 // memory leak detectors don't throw up false positives.
31 
32 #endif // vsl_binary_loader_base_h_
void register_this()
Register this, so it can be deleted by vsl_delete_all_loaders();.
void vsl_delete_all_loaders()
Deletes all the loaders derived from this class.
vsl_binary_loader_base()=default
Dflt ctor.
Base class for vsl_binary_loader objects.
virtual ~vsl_binary_loader_base()=default
Destructor.