---
name: "ACE_Service_Object_Ptr"
section: "3"
platform: "linux"
package: "libace-doc"
version: "5.0.7-4"
release: "Debian 2.2 (Potato)"
platforms: ["linux"]
url: "https://new.carta.tech/ACE_Service_Object_Ptr"
---

# ACE\_Service\_Object\_Ptr(3)

This is a smart pointer that holds onto the associated ACE\_Service\_Object \* until the current scope is left, at which point the object's fini hook is called and the service\_object\_ gets deleted.

## NAME

ACE\_Service\_Object\_Ptr -  This is a smart pointer that holds onto the associated ACE\_Service\_Object \* until the current scope is left, at which point the object's fini hook is called and the service\_object\_ gets deleted.

## SYNOPSIS

```
#include <ace/Service_Object.h>
class ACE_Service_Object_Ptr
{
  public:
    ACE_Service_Object_Ptr (ACE_Service_Object *so);
    ~ACE_Service_Object_Ptr (void);
    ACE_Service_Object *operator-> ();
  private:
    ACE_Service_Object *service_object_;
};
```

## DESCRIPTION

This class is similar to the Standard C++ Library class auto\_ptr.  It is used in conjunction with statically linked ACE\_Service\_Objects, as shown in the

## Initialization and termination methods.

```
ACE_Service_Object_Ptr (ACE_Service_Object *so);
```

Acquire ownership of the so.

```
~ACE_Service_Object_Ptr (void);
```

Release the held ACE\_Service\_Object by calling its fini hook.

```
ACE_Service_Object *operator-> ();
```

Smart pointer to access the underlying ACE\_Service\_Object.

## AUTHOR

Doug Schmidt

## LIBRARY

ace
