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 | eda79b335ab42b4273c2c1f193d66f22d264ba6b (patch) | |
tree | 26231935ecf2dbfb6ebb12c6f5b7213710fd2498 /ace/Singleton.i | |
parent | 2af513c4e333e134946d837933fea066a25a4034 (diff) | |
download | ATCD-eda79b335ab42b4273c2c1f193d66f22d264ba6b.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>) { } |