From 5269fc0e04984b2d196d5eaf96e206e034d21184 Mon Sep 17 00:00:00 2001 From: Ted Ross Date: Fri, 20 Aug 2010 13:58:20 +0000 Subject: QPID-2798 - C++ Messaging Client .NET binding fails to clone managed objects correctly Patch from Chuck Rolke git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@987510 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/bindings/qpid/dotnet/src/Connection.h | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'cpp/bindings/qpid/dotnet/src/Connection.h') diff --git a/cpp/bindings/qpid/dotnet/src/Connection.h b/cpp/bindings/qpid/dotnet/src/Connection.h index 0907d996ab..23d0679fd5 100644 --- a/cpp/bindings/qpid/dotnet/src/Connection.h +++ b/cpp/bindings/qpid/dotnet/src/Connection.h @@ -60,6 +60,9 @@ namespace Messaging { // copy constructor Connection(const Connection ^ connection); + // unmanaged clone + // not defined + ~Connection(); !Connection(); @@ -72,7 +75,8 @@ namespace Messaging { } else { - delete connectionp; + if (NULL != connectionp) + delete connectionp; connectionp = new ::qpid::messaging::Connection( *(const_cast(rhs).NativeConnection) ); } @@ -84,15 +88,6 @@ namespace Messaging { ::qpid::messaging::Connection * get () { return connectionp; } } - property System::String ^ NPAddress - { - System::String ^ get () - { - System::IntPtr i((void *)connectionp); - return gcnew System::String(i.ToString()); - } - } - void SetOption(System::String ^ name, System::Object ^ value); void Open(); -- cgit v1.2.1