summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbala <balanatarajan@users.noreply.github.com>2000-03-03 20:44:16 +0000
committerbala <balanatarajan@users.noreply.github.com>2000-03-03 20:44:16 +0000
commit47fbe5c38f31c4ba449b631b29f7eea138827cd4 (patch)
tree308b860b47ecfb22ae395a560d2f215ad187c83d
parent4f22d1ffbe239634b468a9c5bb7843f6e09a08fe (diff)
downloadATCD-47fbe5c38f31c4ba449b631b29f7eea138827cd4.tar.gz
ChangeLogTag: Fri Mar 3 14:41:42 2000 Balachandran Natarajan <bala@cs.wustl.edu>
-rw-r--r--TAO/ChangeLogs/ChangeLog-02a6
-rw-r--r--TAO/tao/Sequence.cpp12
-rw-r--r--TAO/tao/Typecode.cpp30
3 files changed, 37 insertions, 11 deletions
diff --git a/TAO/ChangeLogs/ChangeLog-02a b/TAO/ChangeLogs/ChangeLog-02a
index 281c63ad015..e44dc064013 100644
--- a/TAO/ChangeLogs/ChangeLog-02a
+++ b/TAO/ChangeLogs/ChangeLog-02a
@@ -1,3 +1,9 @@
+Fri Mar 3 14:41:42 2000 Balachandran Natarajan <bala@cs.wustl.edu>
+
+ * tao/Sequence.cpp (allocbuf):
+ * tao/Typecode.cpp: Removed the use of "naked new"
+ operators.
+
Fri Mar 3 13:41:12 2000 Balachandran Natarajan <bala@cs.wustl.edu>
* tao/IIOP_Profile.cpp:
diff --git a/TAO/tao/Sequence.cpp b/TAO/tao/Sequence.cpp
index 2a232221ca2..b43ee0505d3 100644
--- a/TAO/tao/Sequence.cpp
+++ b/TAO/tao/Sequence.cpp
@@ -146,7 +146,11 @@ TAO_Unbounded_String_Sequence::operator[] (CORBA::ULong slot) const
char* *
TAO_Unbounded_String_Sequence::allocbuf (CORBA::ULong nelems)
{
- char* *buf = new char*[nelems];
+ char **buf;
+ ACE_NEW_RETURN (buf,
+ char *[nelems],
+ 0);
+ //char* *buf = new char*[nelems];
for (CORBA::ULong i=0; i < nelems; i++)
buf[i] = 0;
return buf;
@@ -367,7 +371,11 @@ TAO_Unbounded_WString_Sequence::operator[] (CORBA::ULong slot) const
CORBA::WChar* *
TAO_Unbounded_WString_Sequence::allocbuf (CORBA::ULong nelems)
{
- CORBA::WChar* *buf = new CORBA::WChar*[nelems];
+ CORBA::WChar **buf;
+ ACE_NEW_RETURN (buf,
+ CORBA::WChar *[nelems],
+ 0);
+ // CORBA::WChar* *buf = new CORBA::WChar*[nelems];
for (CORBA::ULong i=0; i < nelems; i++)
buf[i] = 0;
return buf;
diff --git a/TAO/tao/Typecode.cpp b/TAO/tao/Typecode.cpp
index 919a5926c2f..03b27e5742b 100644
--- a/TAO/tao/Typecode.cpp
+++ b/TAO/tao/Typecode.cpp
@@ -1787,9 +1787,13 @@ CORBA_TypeCode::private_member_name (CORBA::ULong slot,
else
ACE_THROW_RETURN (CORBA::TypeCode::Bounds (), 0);
- // the first time in. Precompute and store names of all members
- // Allocate a list to hold the member names
- this->private_state_->tc_member_name_list_ = new char* [mcount];
+ // the first time in. Precompute and store names of all members
+ // Allocate a list to hold the member names
+ ACE_NEW_THROW_EX (this->private_state_->tc_member_name_list_,
+ char* [mcount],
+ CORBA::NO_MEMORY ());
+ ACE_CHECK_RETURN (0);
+ // this->private_state_->tc_member_name_list_ = new char* [mcount];
if (this->private_state_->tc_member_name_list_ == 0)
// no memory for the member_list
@@ -1833,9 +1837,13 @@ CORBA_TypeCode::private_member_name (CORBA::ULong slot,
else
ACE_THROW_RETURN (CORBA::TypeCode::Bounds (), 0);
- // the first time in. Precompute and store names of all members
- // Allocate a list to hold the member names
- this->private_state_->tc_member_name_list_ = new char* [mcount];
+ // the first time in. Precompute and store names of all members
+ // Allocate a list to hold the member names
+ ACE_NEW_THROW_EX (this->private_state_->tc_member_name_list_,
+ char* [mcount],
+ CORBA::NO_MEMORY ());
+ ACE_CHECK_RETURN (0);
+ //this->private_state_->tc_member_name_list_ = new char* [mcount];
if (this->private_state_->tc_member_name_list_ == 0)
// no memory for the member_list
@@ -1878,9 +1886,13 @@ CORBA_TypeCode::private_member_name (CORBA::ULong slot,
else
ACE_THROW_RETURN (CORBA::TypeCode::Bounds (), 0);
- // the first time in. Precompute and store names of all members
- // Allocate a list to hold the member names
- this->private_state_->tc_member_name_list_ = new char* [mcount];
+ // the first time in. Precompute and store names of all members
+ // Allocate a list to hold the member names
+ ACE_NEW_THROW_EX (this->private_state_->tc_member_name_list_,
+ char* [mcount],
+ CORBA::NO_MEMORY ());
+ ACE_CHECK_RETURN (0);
+ // this->private_state_->tc_member_name_list_ = new char* [mcount];
if (this->private_state_->tc_member_name_list_ == 0)
// no memory for the member_list