summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog10
-rw-r--r--ChangeLogs/ChangeLog-02a10
-rw-r--r--ChangeLogs/ChangeLog-03a10
-rw-r--r--ace/DLL.cpp13
-rw-r--r--ace/DLL_Manager.cpp19
5 files changed, 42 insertions, 20 deletions
diff --git a/ChangeLog b/ChangeLog
index a1fe09196be..0aea8d962ef 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Sun Jun 16 20:38:27 2002 Krishnakumar B <kitty@cs.wustl.edu>
+
+ * ace/DLL_Manager.cpp (ACE_DLL_Handle):
+ * ace/DLL.cpp:
+
+ More mismatched delete/delete[] errors. I am fixing the easier
+ ones. There may be more.
+
Sun Jun 16 20:22:28 2002 Krishnakumar B <kitty@cs.wustl.edu>
* ACEXML/common/AttributesImpl.i (qName):
@@ -5,7 +13,7 @@ Sun Jun 16 20:22:28 2002 Krishnakumar B <kitty@cs.wustl.edu>
Fixed memory leaks caused by mismatched delete/delete[]. Caught
by Valgrind.
- * /ACEXML/examples/SAXPrint/main.cpp:
+ * ACEXML/examples/SAXPrint/main.cpp:
Give useful usage messages.
diff --git a/ChangeLogs/ChangeLog-02a b/ChangeLogs/ChangeLog-02a
index a1fe09196be..0aea8d962ef 100644
--- a/ChangeLogs/ChangeLog-02a
+++ b/ChangeLogs/ChangeLog-02a
@@ -1,3 +1,11 @@
+Sun Jun 16 20:38:27 2002 Krishnakumar B <kitty@cs.wustl.edu>
+
+ * ace/DLL_Manager.cpp (ACE_DLL_Handle):
+ * ace/DLL.cpp:
+
+ More mismatched delete/delete[] errors. I am fixing the easier
+ ones. There may be more.
+
Sun Jun 16 20:22:28 2002 Krishnakumar B <kitty@cs.wustl.edu>
* ACEXML/common/AttributesImpl.i (qName):
@@ -5,7 +13,7 @@ Sun Jun 16 20:22:28 2002 Krishnakumar B <kitty@cs.wustl.edu>
Fixed memory leaks caused by mismatched delete/delete[]. Caught
by Valgrind.
- * /ACEXML/examples/SAXPrint/main.cpp:
+ * ACEXML/examples/SAXPrint/main.cpp:
Give useful usage messages.
diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a
index a1fe09196be..0aea8d962ef 100644
--- a/ChangeLogs/ChangeLog-03a
+++ b/ChangeLogs/ChangeLog-03a
@@ -1,3 +1,11 @@
+Sun Jun 16 20:38:27 2002 Krishnakumar B <kitty@cs.wustl.edu>
+
+ * ace/DLL_Manager.cpp (ACE_DLL_Handle):
+ * ace/DLL.cpp:
+
+ More mismatched delete/delete[] errors. I am fixing the easier
+ ones. There may be more.
+
Sun Jun 16 20:22:28 2002 Krishnakumar B <kitty@cs.wustl.edu>
* ACEXML/common/AttributesImpl.i (qName):
@@ -5,7 +13,7 @@ Sun Jun 16 20:22:28 2002 Krishnakumar B <kitty@cs.wustl.edu>
Fixed memory leaks caused by mismatched delete/delete[]. Caught
by Valgrind.
- * /ACEXML/examples/SAXPrint/main.cpp:
+ * ACEXML/examples/SAXPrint/main.cpp:
Give useful usage messages.
diff --git a/ace/DLL.cpp b/ace/DLL.cpp
index a911f04ee16..a07a9ff5c99 100644
--- a/ace/DLL.cpp
+++ b/ace/DLL.cpp
@@ -99,7 +99,7 @@ ACE_DLL::open_i (const ACE_TCHAR *dll_filename,
ACE_SHLIB_HANDLE handle)
{
ACE_TRACE ("ACE_DLL::open_i");
-
+
this->error_ = 0;
if (!dll_filename)
@@ -123,7 +123,7 @@ ACE_DLL::open_i (const ACE_TCHAR *dll_filename,
this->open_mode_ = open_mode;
this->close_on_destruction_ = close_on_destruction;
- this->dll_handle_ = ACE_DLL_Manager::instance()->open_dll (this->dll_name_,
+ this->dll_handle_ = ACE_DLL_Manager::instance()->open_dll (this->dll_name_,
this->open_mode_,
handle);
@@ -165,7 +165,7 @@ ACE_DLL::close (void)
// Even if close_dll() failed, go ahead and cleanup.
this->dll_handle_ = 0;
- delete this->dll_name_;
+ delete[] this->dll_name_;
this->dll_name_ = 0;
this->close_on_destruction_ = 0;
@@ -179,10 +179,10 @@ ACE_DLL::error (void) const
{
ACE_TRACE ("ACE_DLL::error");
if (this->error_)
- return ACE_const_cast (ACE_TCHAR *,
+ return ACE_const_cast (ACE_TCHAR *,
ACE_LIB_TEXT ("Error: check log for details."));
- return 0;
+ return 0;
}
// Return the handle to the user either temporarily or forever, thus
@@ -199,7 +199,7 @@ ACE_DLL::get_handle (int become_owner) const
if (this->dll_handle_)
handle = this->dll_handle_->get_handle (become_owner);
- return handle;
+ return handle;
}
// Set the handle for the DLL. By default, the object will be closed
@@ -218,4 +218,3 @@ ACE_DLL::set_handle (ACE_SHLIB_HANDLE handle,
return this->open_i (temp, 1, close_on_destruction, handle);
}
-
diff --git a/ace/DLL_Manager.cpp b/ace/DLL_Manager.cpp
index f2df768757a..4ab860c7636 100644
--- a/ace/DLL_Manager.cpp
+++ b/ace/DLL_Manager.cpp
@@ -29,7 +29,7 @@ ACE_DLL_Handle::~ACE_DLL_Handle (void)
{
ACE_TRACE ("ACE_DLL_Handle::~ACE_DLL_Handle");
this->close (1);
- delete this->dll_name_;
+ delete[] this->dll_name_;
}
const ACE_TCHAR *
@@ -108,7 +108,7 @@ ACE_DLL_Handle::open (const ACE_TCHAR *dll_name,
if (this->handle_ == ACE_SHLIB_INVALID_HANDLE)
{
ACE_ERROR_RETURN ((LM_ERROR,
- ACE_LIB_TEXT ("ACE_DLL_Manager_Ex::open: Invalid handle: %s\n"),
+ ACE_LIB_TEXT ("ACE_DLL_Manager_Ex::open: Invalid handle: %s\n"),
this->error ()->c_str ()),
-1);
}
@@ -209,7 +209,7 @@ ACE_DLL_Handle::get_handle (int become_owner)
ACE_DEBUG ((LM_DEBUG,
ACE_LIB_TEXT ("ACE_DLL_Handle::get_handle: ")
ACE_LIB_TEXT ("handle %s, refcount %d\n"),
- this->handle_ == ACE_SHLIB_INVALID_HANDLE ?
+ this->handle_ == ACE_SHLIB_INVALID_HANDLE ?
ACE_LIB_TEXT ("invalid") : ACE_LIB_TEXT ("valid"),
this->refcount_));
@@ -359,8 +359,8 @@ ACE_DLL_Manager::unload_policy (u_long unload_policy)
u_long old_policy = this->unload_policy_;
this->unload_policy_ = unload_policy;
- // If going from LAZY to EAGER or from PER_DLL to PER_PROCESS|EAGER,
- // call close(1) on all the ACE_DLL_Handle objects with refcount == 0
+ // If going from LAZY to EAGER or from PER_DLL to PER_PROCESS|EAGER,
+ // call close(1) on all the ACE_DLL_Handle objects with refcount == 0
// which will force those that are still loaded to be unloaded.
if (this->handle_vector_)
if (( ACE_BIT_ENABLED (old_policy, ACE_DLL_UNLOAD_POLICY_LAZY) &&
@@ -450,10 +450,10 @@ ACE_DLL_Manager::unload_dll (ACE_DLL_Handle *dll_handle, int force_unload)
if (unload == 0)
{
// apply strategy
- if (ACE_BIT_DISABLED (this->unload_policy_,
+ if (ACE_BIT_DISABLED (this->unload_policy_,
ACE_DLL_UNLOAD_POLICY_PER_DLL))
{
- unload = ACE_BIT_DISABLED (this->unload_policy_,
+ unload = ACE_BIT_DISABLED (this->unload_policy_,
ACE_DLL_UNLOAD_POLICY_LAZY);
}
else
@@ -468,10 +468,10 @@ ACE_DLL_Manager::unload_dll (ACE_DLL_Handle *dll_handle, int force_unload)
long tmp = ACE_reinterpret_cast (long, foo);
dll_unload_policy the_policy = ACE_reinterpret_cast (dll_unload_policy, tmp);
if (the_policy != 0)
- unload = ACE_BIT_DISABLED (the_policy (),
+ unload = ACE_BIT_DISABLED (the_policy (),
ACE_DLL_UNLOAD_POLICY_LAZY);
else
- unload = ACE_BIT_DISABLED (this->unload_policy_,
+ unload = ACE_BIT_DISABLED (this->unload_policy_,
ACE_DLL_UNLOAD_POLICY_LAZY);
}
}
@@ -489,4 +489,3 @@ ACE_DLL_Manager::unload_dll (ACE_DLL_Handle *dll_handle, int force_unload)
return 0;
}
-