# std::scoped_allocator_adaptor<OuterAlloc,InnerAlloc...>::deallocate

> C++ Atlas: `cppatlas.com/w/cpp/memory/scoped_allocator_adaptor/deallocate` | Source: https://en.cppreference.com/w/cpp/memory/scoped_allocator_adaptor/deallocate | Domain: Memory management | Standards: C++11

Uses the outer allocator to deallocate the storage referenced by p, by calling std::allocator_traits<OuterAlloc>::deallocate(outer_allocator(), p, n).

## Official Specification Summary (cppreference)

```cpp
// Defined in header <scoped_allocator>
void deallocate( pointer p, size_type n ) noexcept; // (since C++11)
```

Uses the outer allocator to deallocate the storage referenced by `p`, by calling `std::allocator_traits<OuterAlloc>::deallocate(outer_allocator(), p, n)`.

### Parameters

- `p` - pointer to the previously allocated memory
- `n` - the number of objects for which the memory was allocated

### Return value

(none)

### See also

- [`deallocate`](https://en.cppreference.com/w/cpp/memory/allocator/deallocate): deallocates storage (public member function of `std::allocator<T>`)
- [`deallocate`](https://en.cppreference.com/w/cpp/memory/allocator_traits/deallocate) [static]: deallocates storage using the allocator (public static member function of `std::allocator_traits<Alloc>`)

---
Attribution: content from https://en.cppreference.com/w/cpp/memory/scoped_allocator_adaptor/deallocate (cppreference.com), licensed under CC-BY-SA 3.0 and GFDL. Modified: converted to markdown, study notes added. Offline snapshot of 9 February 2025.