diff options
| author | Charles E. Rolke <chug@apache.org> | 2011-01-10 20:43:56 +0000 |
|---|---|---|
| committer | Charles E. Rolke <chug@apache.org> | 2011-01-10 20:43:56 +0000 |
| commit | c95e40580ef57d5a1e36e9105ae18dbffe3c3de8 (patch) | |
| tree | 9ea688597fefd0ae6ab1c42b8b99d142f42b082f /cpp/bindings/qpid/dotnet/src/FailoverUpdates.cpp | |
| parent | 02d83427237f6929595692fa12b9a614e523ccda (diff) | |
| download | qpid-python-c95e40580ef57d5a1e36e9105ae18dbffe3c3de8.tar.gz | |
.NET Binding for Qpid Messaging, in every .NET object that keeps
a reference to unmanaged memory:
* Function Cleanup() is deleted and cleanup is moved to Finalizer.
* Destructor calls Finalizer.
* Finalizer takes a lock before deleting unmanaged memory.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1057350 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/bindings/qpid/dotnet/src/FailoverUpdates.cpp')
| -rw-r--r-- | cpp/bindings/qpid/dotnet/src/FailoverUpdates.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/cpp/bindings/qpid/dotnet/src/FailoverUpdates.cpp b/cpp/bindings/qpid/dotnet/src/FailoverUpdates.cpp index a931e2d670..d34474f2c4 100644 --- a/cpp/bindings/qpid/dotnet/src/FailoverUpdates.cpp +++ b/cpp/bindings/qpid/dotnet/src/FailoverUpdates.cpp @@ -64,21 +64,15 @@ namespace Messaging { // Destructor
FailoverUpdates::~FailoverUpdates()
{
- Cleanup();
+ this->!FailoverUpdates();
}
// Finalizer
FailoverUpdates::!FailoverUpdates()
{
- Cleanup();
- }
-
+ msclr::lock lk(this);
- // Destroys kept object
- // TODO: add lock
- void FailoverUpdates::Cleanup()
- {
if (NULL != failoverupdatesp)
{
delete failoverupdatesp;
|
