diff options
author | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-07-29 03:31:08 +0000 |
---|---|---|
committer | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-07-29 03:31:08 +0000 |
commit | 9d8218d215479e86eb34278116a3fea4869d1784 (patch) | |
tree | a5946f0b8beef753e93a7a9247b0a3e02ce8039e /ace/Object_Manager.h | |
parent | 25aa954eea3b2b057b6580869eb802f29263c51f (diff) | |
download | ATCD-9d8218d215479e86eb34278116a3fea4869d1784.tar.gz |
(delete_at_exit,delete_array_at_exit): made these (inline) static functions, with return values.
Diffstat (limited to 'ace/Object_Manager.h')
-rw-r--r-- | ace/Object_Manager.h | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/ace/Object_Manager.h b/ace/Object_Manager.h index 9352123ee99..099e73a733e 100644 --- a/ace/Object_Manager.h +++ b/ace/Object_Manager.h @@ -35,18 +35,25 @@ class ACE_Export ACE_Object_Manager // own cleanup. // It would be worth adding a capability to do the shutdown prior to // static object destruction, e.g., via an at_exit () call. Without - // that capability, on VxWorks, for example, the program must be unloaded - // for this to work. + // that capability, on VxWorks, for example, the program can be unloaded + // for this to work. (On VxWorks, alternatively, the explicity OS calls + // to call all static destructors and constructors could be used.) { public: static ACE_Object_Manager *instance (); // Accessor to singleton instance. - void delete_at_exit (void *); + static int delete_at_exit (void *object); // Register an object for deletion at program termination. + // Returns 0 on success, non-zero on failure: -1 if virtual + // memory is exhausted or 1 if the object had already been + // registered. - void delete_array_at_exit (void *); + static int delete_array_at_exit (void *array); // Register an array for deletion at program termination. + // Returns 0 on success, non-zero on failure: -1 if virtual + // memory is exhausted or 1 if the object had already been + // registered. private: static ACE_Object_Manager *instance_; @@ -57,7 +64,19 @@ private: ACE_Object_Manager (); ~ACE_Object_Manager (); + int delete_at_exit_ (void *); + // Register an object for deletion at program termination. + // See description of static version above for return values. + + int delete_array_at_exit_ (void *); + // Register an array for deletion at program termination. + // See description of static version above for return values. + friend class ACE_Object_Manager_Destroyer; }; +#if defined (__ACE_INLINE__) +#include "ace/Object_Manager.i" +#endif /* __ACE_INLINE__ */ + #endif /* ACE_OBJECT_MANAGER_H */ |