core/vsl/vsl_binary_loader_base.h
Go to the documentation of this file.
00001 // This is core/vsl/vsl_binary_loader_base.h
00002 #ifndef vsl_binary_loader_base_h_
00003 #define vsl_binary_loader_base_h_
00004 #ifdef VCL_NEEDS_PRAGMA_INTERFACE
00005 #pragma interface
00006 #endif
00007 //:
00008 // \file
00009 
00010 //: Base class for vsl_binary_loader objects
00011 //  Available to keep a record of all the loaders, so that they
00012 //  can be deleted to avoid memory leaks.
00013 //  See also vsl_delete_all_loaders().
00014 class vsl_binary_loader_base
00015 {
00016  public:
00017   //: Dflt ctor
00018   vsl_binary_loader_base() {}
00019 
00020   //: Destructor
00021   virtual ~vsl_binary_loader_base() {}
00022 
00023  protected:
00024   //: Register this, so it can be deleted by vsl_delete_all_loaders();
00025   void register_this();
00026 };
00027 
00028 
00029 //: Deletes all the loaders derived from this class
00030 //  Deletes every loader for which register_this() has been called
00031 //  This function is automatically called on program exit to ensure
00032 //  memory leak detectors don't throw up false positives.
00033 void vsl_delete_all_loaders();
00034 
00035 #endif // vsl_binary_loader_base_h_