Skip to content

Commit 8840ec8

Browse files
authored
Merge pull request #71 from watersalesman/remove-cleanup-in-docs
Remove deprecated class curlpp::Cleanup from examples and guide
2 parents 130fd07 + fe90085 commit 8840ec8

27 files changed

+1
-41
lines changed

doc/guide.pdf

27 KB
Binary file not shown.

doc/guide.tex

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -111,12 +111,8 @@ \section{Global Preparation}
111111
When the program no longer uses cURLpp, it should call \verb+cURLpp::terminate()+,
112112
which is the opposite of the init call. It will then do the operations needed
113113
to cleanup the resources that the \verb+cURLpp::initialize()+ call initialized.
114-
115114
Repeated calls to \verb+cURLpp::initialize()+ and \verb+cURLpp::terminate()+ must not be made.
116-
They must only be called once each. The cURLpp::Cleanup class can be used to do this. It will
117-
call the \verb+cURLpp::initialize()+ function in its constructor and \verb+cURLpp::terminate()+
118-
in its destructor. Check example01.cpp in the examples/ directory of
119-
the source distribution for an example.
115+
They must only be called once each.
120116

121117
\section{Handle the Easy cURLpp}
122118

@@ -268,8 +264,6 @@ \subsubsection{cURLpp::Options}
268264
{
269265
try
270266
{
271-
cURLpp::Cleanup myCleanup;
272-
273267
// Creation of the URL option.
274268
cURLpp::Options::Url myUrl(
275269
std::string("http://example.com"));

examples/example00.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@ int main(int, char **)
1515
{
1616
try
1717
{
18-
// That's all that is needed to do cleanup of used resources (RAII style).
19-
curlpp::Cleanup myCleanup;
20-
2118
// Our request to be sent.
2219
curlpp::Easy myRequest;
2320

examples/example01.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@ int main(int, char **)
4949
{
5050
try
5151
{
52-
curlpp::Cleanup myCleanup;
53-
5452
// First easy example.
5553
{
5654
// The first easiest example is to retreive the content of

examples/example02.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ int main(int argc, char *argv[])
7272
char buf[50];
7373
try
7474
{
75-
curlpp::Cleanup cleaner;
7675
curlpp::Easy request;
7776

7877
std::list<std::string> headers;

examples/example03.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ int main(int argc, char *argv[])
6161

6262
try
6363
{
64-
curlpp::Cleanup cleaner;
6564
curlpp::Easy request;
6665

6766
using namespace curlpp::Options;

examples/example04.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ int main(int argc, char *argv[])
5050

5151
try
5252
{
53-
curlpp::Cleanup cleaner;
5453
curlpp::Easy request;
5554

5655
using namespace curlpp::Options;

examples/example05.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ int main(int argc, char *argv[])
9393

9494
try
9595
{
96-
curlpp::Cleanup cleaner;
9796
curlpp::Easy request;
9897

9998
// Set the writer callback to enable cURL

examples/example06.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ int main(int argc, char *argv[])
111111

112112
try
113113
{
114-
curlpp::Cleanup cleaner;
115114
curlpp::Easy request;
116115

117116
WriterMemoryClass mWriterChunk;

examples/example07.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ main(void)
117117
{
118118
try
119119
{
120-
curlpp::Cleanup myCleanup;
121120
curlpp::Easy exEasy;
122121
std::vector<std::string> cookieList;
123122

0 commit comments

Comments
 (0)