A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Loading...
Searching...
No Matches
default-deleter.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2010 INRIA
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
*/
7
8
#ifndef DEFAULT_DELETER_H
9
#define DEFAULT_DELETER_H
10
11
/**
12
* \file
13
* \ingroup ptr
14
* ns3::DefaultDeleter declaration and template implementation,
15
* for reference-counted smart pointers.
16
*/
17
18
namespace
ns3
19
{
20
21
/**
22
* \ingroup ptr
23
* \brief A template used to delete objects
24
* by the ns3::SimpleRefCount templates when the
25
* last reference to an object they manage
26
* disappears.
27
*
28
* \tparam T \deduced The object type being deleted.
29
* \sa ns3::SimpleRefCount
30
*/
31
template
<
typename
T>
32
struct
DefaultDeleter
33
{
34
/**
35
* The default deleter implementation, which just does a normal
36
* \code
37
* delete object;
38
* \endcode
39
* \tparam T \deduced The object type being deleted.
40
* \param [in] object The object to delete.
41
*/
42
inline
static
void
Delete
(T*
object
)
43
{
44
delete
object
;
45
}
46
};
47
48
}
// namespace ns3
49
50
#endif
/* DEFAULT_DELETER_H */
object
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::DefaultDeleter
A template used to delete objects by the ns3::SimpleRefCount templates when the last reference to an ...
Definition
default-deleter.h:33
ns3::DefaultDeleter::Delete
static void Delete(T *object)
The default deleter implementation, which just does a normal.
Definition
default-deleter.h:42
src
core
model
default-deleter.h
Generated on Wed Oct 9 2024 01:03:22 for ns-3 by
1.11.0