diff options
author | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-09-22 18:15:37 +0000 |
---|---|---|
committer | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-09-22 18:15:37 +0000 |
commit | c0362ccaa08b0171a2890302198c22c93f80dcc8 (patch) | |
tree | 26231935ecf2dbfb6ebb12c6f5b7213710fd2498 /ace/Singleton.i | |
parent | ef05f8eeba76731bb0f742cf2d3a4649da037dd3 (diff) | |
download | ATCD-c0362ccaa08b0171a2890302198c22c93f80dcc8.tar.gz |
removed instance (TYPE *) member function because it wasn't being used. And, it allows us to store the contained instances_ as an object instead of a pointer, saving a dynamic memory allocation on construction.
Diffstat (limited to 'ace/Singleton.i')
-rw-r--r-- | ace/Singleton.i | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ace/Singleton.i b/ace/Singleton.i index 4aac1ef0853..d3ac6fe3e33 100644 --- a/ace/Singleton.i +++ b/ace/Singleton.i @@ -3,17 +3,18 @@ // Singleton.i -// Default constructor. +// Default constructors. +// +// Note: don't explicitly initialize "instance_", because TYPE may not +// have a default constructor. Let the compiler figure it out . . . template <class TYPE, class LOCK> ACE_INLINE ACE_Singleton<TYPE, LOCK>::ACE_Singleton (void) - : instance_ (new TYPE) { } template <class TYPE, class LOCK> ACE_INLINE ACE_TSS_Singleton<TYPE, LOCK>::ACE_TSS_Singleton (void) - : instance_ (new ACE_TSS<TYPE>) { } |