Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dlib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
dlib
Commits
fa94cdfa
Commit
fa94cdfa
authored
May 14, 2017
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed references to old smart pointers from the docs.
parent
65aad557
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
94 deletions
+3
-94
containers.xml
docs/docs/containers.xml
+0
-87
howto_contribute.xml
docs/docs/howto_contribute.xml
+3
-3
term_index.xml
docs/docs/term_index.xml
+0
-4
No files found.
docs/docs/containers.xml
View file @
fa94cdfa
...
...
@@ -80,14 +80,6 @@
</section>
<section>
<name>
Smart Pointers
</name>
<item>
scoped_ptr
</item>
<item>
shared_ptr
</item>
<item>
shared_ptr_thread_safe
</item>
<item>
weak_ptr
</item>
</section>
<section>
<name>
Interfaces
</name>
<item>
map_pair
</item>
...
...
@@ -482,29 +474,6 @@
</component>
<!-- ************************************************************************* -->
<component>
<name>
weak_ptr
</name>
<file>
dlib/smart_pointers.h
</file>
<spec_file>
dlib/smart_pointers/weak_ptr_abstract.h
</spec_file>
<description>
<p>
The weak_ptr class template stores a weak reference to an object that is
already managed by a shared_ptr. To access the object, a weak_ptr can
be converted to a shared_ptr using the member function lock().
</p>
<p>
This is an implementation of the std::tr1::weak_ptr template from the
document ISO/IEC PDTR 19768, Proposed Draft Technical Report on C++
Library Extensions. The only deviation from that document is that this
shared_ptr is declared inside the dlib namespace rather than std::tr1.
</p>
</description>
</component>
<!-- ************************************************************************* -->
<component>
...
...
@@ -619,45 +588,6 @@
</description>
</component>
<!-- ************************************************************************* -->
<component>
<name>
shared_ptr_thread_safe
</name>
<file>
dlib/smart_pointers_thread_safe.h
</file>
<spec_file>
dlib/smart_pointers/shared_ptr_thread_safe_abstract.h
</spec_file>
<description>
<p>
This object represents a reference counted smart pointer just like
<a
href=
"#shared_ptr"
>
shared_ptr
</a>
except that it is threadsafe.
</p>
</description>
</component>
<!-- ************************************************************************* -->
<component>
<name>
shared_ptr
</name>
<file>
dlib/smart_pointers.h
</file>
<spec_file>
dlib/smart_pointers/shared_ptr_abstract.h
</spec_file>
<description>
<p>
This object represents a reference counted smart pointer. Each shared_ptr
contains a pointer to some object and when the last shared_ptr that points
to the object is destructed or reset() then the object is guaranteed to be
deleted.
</p>
<p>
This is an implementation of the std::tr1::shared_ptr template from the
document ISO/IEC PDTR 19768, Proposed Draft Technical Report on C++
Library Extensions. The only deviation from that document is that this
shared_ptr is declared inside the dlib namespace rather than std::tr1.
</p>
</description>
</component>
<!-- ************************************************************************* -->
<component>
...
...
@@ -698,23 +628,6 @@
<!-- ************************************************************************* -->
<component>
<name>
scoped_ptr
</name>
<file>
dlib/smart_pointers.h
</file>
<spec_file>
dlib/smart_pointers/scoped_ptr_abstract.h
</spec_file>
<description>
This is a implementation of the scoped_ptr class found in the Boost C++
library. It is a simple smart pointer class which guarantees that the
pointer contained within it will always be deleted.
The class does not permit copying and so does not do any kind of
reference counting. Thus it is very simple and quite fast.
</description>
</component>
<!-- ************************************************************************* -->
<component
checked=
"true"
>
<name>
graph
</name>
<file>
dlib/graph.h
</file>
...
...
docs/docs/howto_contribute.xml
View file @
fa94cdfa
...
...
@@ -215,7 +215,7 @@
instead.
</h3>
<ul><p>
You should not be calling new and delete in your own code. You should instead
be using objects like the std::vector,
<a
href=
"containers.html#scoped_ptr"
>
scoped_ptr
</a>
,
be using objects like the std::vector,
std::shared_ptr
,
or any number of other objects that manage resources such as memory for you. If you want
an array use std::vector (or the checked
<a
href=
"containers.html#std_vector_c"
>
std_vector_c
</a>
).
If you want to make a lookup table use a
<a
href=
"containers.html#map"
>
map
</a>
. If you want
...
...
@@ -234,7 +234,7 @@
to use the
<a
href=
"api.html#auto_mutex"
>
auto_mutex
</a>
which will lock a mutex and automatically
unlock it for you. Or suppose you have made a TCP
<a
href=
"api.html#sockets"
>
connection
</a>
to another machine and you want to be certain the resources associated with that connection
are always released. You can easily accomplish this with RAII by using the s
coped
_ptr as
are always released. You can easily accomplish this with RAII by using the s
td::unique
_ptr as
shown in
<a
href=
"sockstreambuf_ex.cpp.html"
>
this
</a>
example program.
</p>
<p>
...
...
@@ -271,7 +271,7 @@ double compute_sum_of_array_elements(const std::vector<double>& array)
</p>
<p>
If you absolutely need pointer semantics then you can usually use a smart pointer like
<a
href=
"containers.html#scoped_ptr"
>
scoped_ptr
</a>
or
<a
href=
"containers.html#shared_ptr"
>
shared_ptr
</a>
.
std::unique_ptr or std::shared_ptr
.
If that still isn't good enough for you and you
<i>
really
</i>
need to use a normal C style pointer
then isolate your pointers inside a class or function so that they are contained in a small area of the code.
However, in practice the container classes in dlib and the STL are more than sufficient in nearly
...
...
docs/docs/term_index.xml
View file @
fa94cdfa
...
...
@@ -831,11 +831,8 @@
<term
file=
"dlib/svm/sparse_vector_abstract.h.html"
name=
"has_unsigned_keys"
include=
"dlib/sparse_vector.h"
/>
<term
file=
"containers.html"
name=
"remover"
include=
"dlib/interfaces/remover.h"
/>
<term
file=
"containers.html"
name=
"scoped_ptr"
include=
"dlib/smart_pointers.h"
/>
<term
file=
"containers.html"
name=
"set"
include=
"dlib/set.h"
/>
<term
file=
"containers.html"
name=
"shared_ptr"
include=
"dlib/smart_pointers.h"
/>
<term
file=
"containers.html"
name=
"stack"
include=
"dlib/stack.h"
/>
<term
file=
"containers.html"
name=
"weak_ptr"
include=
"dlib/smart_pointers.h"
/>
<term
file=
"containers.html"
name=
"any"
include=
"dlib/any.h"
/>
<term
file=
"containers.html"
name=
"any_function"
include=
"dlib/any.h"
/>
<term
file=
"containers.html"
name=
"any_trainer"
include=
"dlib/any.h"
/>
...
...
@@ -1356,7 +1353,6 @@
<term
file=
"containers.html"
name=
"reference_counter"
include=
"dlib/reference_counter.h"
/>
<term
file=
"containers.html"
name=
"sequence"
include=
"dlib/sequence.h"
/>
<term
file=
"containers.html"
name=
"shared_ptr_thread_safe"
include=
"dlib/smart_pointers_thread_safe.h"
/>
<term
file=
"containers.html"
name=
"sliding_buffer"
include=
"dlib/sliding_buffer.h"
/>
<term
file=
"containers.html"
name=
"circular_buffer"
include=
"dlib/sliding_buffer.h"
/>
<term
file=
"containers.html"
name=
"static_map"
include=
"dlib/static_map.h"
/>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment