source: source/ariba/utility/transport/messages/shared_buffer.cpp@ 10653

Last change on this file since 10653 was 10653, checked in by Michael Tänzer, 12 years ago

Merge the ASIO branch back into trunk

File size: 823 bytes
Line 
1//-----------------------------------------------------------------------------
2// Part of reboost (http://reboost.org). Released under the
3// BSD 2-clause license (http://www.opensource.org/licenses/bsd-license.php).
4// Copyright 2012, Sebastian Mies <mies@reboost.org> --- All rights reserved.
5//-----------------------------------------------------------------------------
6
7#include "shared_buffer.hpp"
8#include <iostream>
9
10namespace reboost {
11
12using namespace std;
13
14#ifdef DEBUG
15
16void shared_buffer_t::onexit() {
17 if (allocated_buffers != 0)
18 cerr << "shared_buffer_t: " << allocated_buffers << " leaked buffers." << endl;
19}
20
21size_t shared_buffer_t::init() {
22 atexit(&shared_buffer_t::onexit);
23 return 0;
24}
25
26size_t shared_buffer_t::allocated_buffers = init();
27boost::mutex allocated_buffers_mutex;
28
29#endif //DEBUG
30
31}
Note: See TracBrowser for help on using the repository browser.