summaryrefslogtreecommitdiff
path: root/ace/Singleton.i
diff options
context:
space:
mode:
authorlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-09-22 18:15:37 +0000
committerlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-09-22 18:15:37 +0000
commiteda79b335ab42b4273c2c1f193d66f22d264ba6b (patch)
tree26231935ecf2dbfb6ebb12c6f5b7213710fd2498 /ace/Singleton.i
parent2af513c4e333e134946d837933fea066a25a4034 (diff)
downloadATCD-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.i7
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>)
{
}