summaryrefslogtreecommitdiff
path: root/TAO/tests/Smart_Proxies/dtor/Smart_Proxy_Impl.cpp
blob: 33354c75f64e92df72d79a8119e8edf5b72234c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
//$Id$

#include "Smart_Proxy_Impl.h"

Test_ptr
Test_Smart_Factory::create_proxy (Test_ptr proxy
                                  ACE_ENV_ARG_DECL_NOT_USED)
{
  // creat Smart_Proxy
  ACE_DEBUG ((LM_DEBUG,
            "create a smart_proxy\n"));

  if (CORBA::is_nil (proxy) == 0)
    ACE_NEW_RETURN (proxy,
                    Test_Smart_Proxy(proxy),
                    0);

  return proxy;
}

Test_Smart_Proxy::Test_Smart_Proxy (Test_ptr proxy)
 : TAO_Smart_Proxy_Base (proxy)
{
  dtor_called = false;
  ACE_DEBUG ((LM_DEBUG, "Smart Proxy constructor called\n"));
}

Test_Smart_Proxy::~Test_Smart_Proxy()
{
  dtor_called = true;
  ACE_DEBUG ((LM_DEBUG, "Smart Proxy destructor called\n"));
}