Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
Deleter.h
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2026 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
4// See the top-level COPYRIGHT file for details.
5// SPDX-License-Identifier: Apache-2.0
6//-----------------------------------------------------------------------------
7/*---------------------------------------------------------------------------*/
8/* Deleter.h (C) 2000-2006 */
9/* */
10/* Utility class for destroying objects allocated by new. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_UTILS_DELETER_H
13#define ARCANE_UTILS_DELETER_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
18
19/*---------------------------------------------------------------------------*/
20/*---------------------------------------------------------------------------*/
21
22namespace Arcane
23{
24
25/*---------------------------------------------------------------------------*/
26/*---------------------------------------------------------------------------*/
27
28/*!
29 * \internal
30 * \brief Utility class for destroying objects allocated by new.
31 */
33{
34 public:
35
36 template <class U> inline void
37 operator()(const U* ptr) const
38 {
39 delete ptr;
40 }
41};
42
43/*---------------------------------------------------------------------------*/
44/*---------------------------------------------------------------------------*/
45
46} // namespace Arcane
47
48/*---------------------------------------------------------------------------*/
49/*---------------------------------------------------------------------------*/
50
51#endif
Arcane configuration file.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --